Parts aren't registering in the local scripts that are in StarterGUI

When I test play it… the collisions stay on, i even tried “:Destroy()” it says something “Nil”
I even tried merging these 2 parts together and it still says something nil. (example I put the door1 and door2 in one script instead of separate script)

I even tried putting it into StarterPlayerScripts doesn’t work

I tried it without files too

Not a bug. Use #help-and-feedback:scripting-support next time.


Things on local scripts aren’t immediately available to the client, as they need time to load in. This is especially obvious when you have larger maps, such as in your videos.

A way to ensure that the part is loaded in before trying to access it is to instead use :WaitForChild.
e.g.

local LBarrier = game.Workspace.Barriers:WaitForChild("StaffBarrier")
2 Likes