say I have a folder for remote events called "remotes" in ReplicatedStorage. if I wanted to access a remote, would I have to use
ReplicatedStorage:WaitForChild("remotes"):WaitForChild("remote_event")
or is this redundant? does it only need to be used on one of these instances?
thanks.
If this folder would be inside of for example workspace then yes, you would have to do this, however, in your case, Yes, it is redundant, instances in ReplicatedStorage
are replicated before local scripts run so there is no need for WaitForChild
there, just index it with a dot. In Roblox parents are replicated first, then their children. On server you actually never have to use it because all Instances are replicated on the server, the only exception are things like new players, their UI for example, you might need WaitForChild
there.
It doesn't matter, although using WaitForChild recursively would be advisable because the remotes folder may load quicker than remote_event does, which will make an error in the script.
Only do
WaitForChild("Events").Remote_Event