Using dot syntax for indexing contents of ReplicatedStorage works perfectly fine, contents of ReplicatedStorage exist implicitly and are replicated by the time local scripts execute. No need for :WaitForChild() here
I just ran a few tests of my own and I tried to set up the scenario as I believe you have it set up. The problem I found was the part appeared not to be there, so I went to the explorer and realised the part was there, just at a completely different Y-value than I was expecting. This is because the local script executes as soon as it can, at which time the player’s character is still in the air (when you start a game the player spawns in the sky and drops down). I fixed the problem by adding a wait(2)
before firing the RemoteEvent in the local script. Obviously this is not ideal and players will have varying loading times, however it showed what the problem for me was: the RemoteEvent is firing too early. Try putting a wait(3)
before firing the RemoteEvent and see if it fixed your problem.
Nope, I looked in the workspace while firing and a part wasn’t created still so I tried increasing the wait time to 10 but nothing still appeared. This is really weird.
Try putting the regular script in the workspace instead and keep the remote event in replicated storage.
It worked, do you know if there is a reason to why I need to have the normal script placed in the workspace?
Scripts
andLocalScripts
will not run when they are parented to ReplicatedStorage
Thank you for the response and your time.