ReplicatedFirst
A container whose contents are replicated to all clients (but not back to the server) first before anything else.
Memory category | Instances |
---|
Member index 7
Description
A container whose contents are replicated to all clients (but not back to the server) first before anything else.
What is ReplicatedFirst for?
ReplicatedFirst is most commonly used to store LocalScripts and other objects that are essential for the game's start. As the contents of ReplicatedFirst replicate to the client before anything else in the game, it is ideal for creating loading GUIs or tutorials.
For objects that do not need to be replicated first, developers should use the ReplicatedStorage container instead.
How can I use ReplicatedFirst?
LocalScripts placed within ReplicatedFirst will run. This means code for custom loading screens or other ReplicatedFirst uses can be ran at the earliest possible point.
There a number of key considerations developers need to remember when running LocalScripts in ReplicatedFirst.
- Its contents replicate before anything else in the game, meaning LocalScripts running in ReplicatedFirst will need to wait for any objects they require to replicate using Instance:WaitForChild()
- Any objects that are to be used by a LocalScript in ReplicatedFirst should also be parented to ReplicatedFirst. Otherwise, they may replicate to the client late, yielding the script and negating the benefit of ReplicatedFirst.
ReplicatedFirst also includes the function ReplicatedFirst:RemoveDefaultLoadingScreen(), which can be used to immediately remove the default Roblox loading screen. Note if any object has been placed in ReplicatedFirst, the default loading screen will remove after 5 seconds regardless if this function has been called or not.
History 17
- 573 Change ReturnType of SetDefaultLoadingGuiRemoved from void to null
- 573 Change ReturnType of RemoveDefaultLoadingScreen from void to null
- 462 Change ThreadSafety of RemoveDefaultLoadingGuiSignal from to Unsafe
- 462 Change ThreadSafety of FinishedReplicating from to Unsafe
- 462 Change ThreadSafety of DefaultLoadingGuiRemoved from to Unsafe
- 462 Change ThreadSafety of SetDefaultLoadingGuiRemoved from to Unsafe
- 462 Change ThreadSafety of RemoveDefaultLoadingScreen from to Unsafe
- 462 Change ThreadSafety of IsFinishedReplicating from to Unsafe
- 462 Change ThreadSafety of IsDefaultLoadingGuiRemoved from to Unsafe
- 303 Add DefaultLoadingGuiRemoved
- 303 Add SetDefaultLoadingGuiRemoved
- 169 Add FinishedReplicating
- 169 Add IsFinishedReplicating
- 154 Add RemoveDefaultLoadingGuiSignal
- 154 Add RemoveDefaultLoadingScreen
- 154 Add IsDefaultLoadingGuiRemoved
- 154 Add ReplicatedFirst
Members 7
DefaultLoadingGuiRemoved
Parameters (0) | ||
---|---|---|
No parameters. |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of DefaultLoadingGuiRemoved from to Unsafe
- 303 Add DefaultLoadingGuiRemoved
FinishedReplicating
Parameters (0) | ||
---|---|---|
No parameters. |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of FinishedReplicating from to Unsafe
- 169 Add FinishedReplicating
IsDefaultLoadingGuiRemoved
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
bool |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of IsDefaultLoadingGuiRemoved from to Unsafe
- 154 Add IsDefaultLoadingGuiRemoved
IsFinishedReplicating
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
bool |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of IsFinishedReplicating from to Unsafe
- 169 Add IsFinishedReplicating
RemoveDefaultLoadingGuiSignal
Parameters (0) | ||
---|---|---|
No parameters. |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 2
- 462 Change ThreadSafety of RemoveDefaultLoadingGuiSignal from to Unsafe
- 154 Add RemoveDefaultLoadingGuiSignal
RemoveDefaultLoadingScreen
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Immediately removes the default Roblox loading screen. Note if any object has been placed in ReplicatedFirst, the default loading screen will remove after 5 seconds regardless if this function has been called or not.
Developers should run this function from a LocalScript in ReplicatedFirst, as scripts in ReplicatedFirst will execute before anything else.
It is advised to not remove the default loading screen unless the developer wishes to display their own loading screen as an alternative. If the default screen is removed without replacement users will be able to see geometry loading in the background.
Thread safety | Unsafe |
---|
History 3
- 573 Change ReturnType of RemoveDefaultLoadingScreen from void to null
- 462 Change ThreadSafety of RemoveDefaultLoadingScreen from to Unsafe
- 154 Add RemoveDefaultLoadingScreen
SetDefaultLoadingGuiRemoved
Parameters (0) | ||
---|---|---|
No parameters. | ||
Returns (1) | ||
null |
Security | RobloxScriptSecurity |
---|---|
Thread safety | Unsafe |
History 3
- 573 Change ReturnType of SetDefaultLoadingGuiRemoved from void to null
- 462 Change ThreadSafety of SetDefaultLoadingGuiRemoved from to Unsafe
- 303 Add SetDefaultLoadingGuiRemoved