Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why do i have to use waitforchild in replicatedStorage?

Asked by 3 years ago

acctually why do i have to use waitforchild in ReplicatedStorage?

2 answers

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

It is because the contents in ReplicatedStorage are being replicated or copied to both the client and the server I think.

0
And also, replication takes time. That is why you need to use :WaitForChild(). Here too (See whats in "What is Replication?"): https://devforum.roblox.com/t/working-with-the-replication-boundary/498521 RazorXX2 24 — 3y
Ad
Log in to vote
0
Answered by
NGC4637 602 Moderation Voter
3 years ago

It is because ReplicatedStorage is (unlike server storage), replicated to the client. And it takes some time for it to replicate to the client, therefore you use waitforchild in local scripts, since it takes some time to replicate. This is also true to stuff like Workspace.

Answer this question