Help with script (Infinite yield possible on)

local player = game.Players.LocalPlayer
local pat = game:WaitForChild("HalloweenDropper").StuffAtHalloweenLobby.HalloweenDropperDone

	pat.Touched:Connect(function()
	script.Parent.Text = "First Step Done!"
	script.Parent.Parent.nextQust1.Visible = true
	
end)

local script inside starterGui,
the part inside serverstorage and teleport to workspace sometimes.

You haven’t specified the ServerStorage properly then as you’re waiting for something to appear in game, instead of game.ServerStorage for example.

hmm I tried to do game.ServerStorage but its still didn’t work
its will be just StuffAtHalloweenLobby is not a valid member of ServerStorage “ServerStorage”
(the part insdie model that inside folder)

Oh sorry, I misread something. The thing is that ServerStorage cannot be accessed by a LocalScripts if I remember correctly.

Unfortunately I’m not at my PC right now but I assume putting that part into ReplicatedStorage might do the trick.

Of course if anyone else has a better approach please feel free to mention it!

Well I can’t do it i have all script for the maps, but thx for trying to help

Don’t put objects inside the game like this. It might delete randomly because it isn’t a service.

I dont know what to do, you can give me example?

You should put this object in ServerStorage. Or ReplicatedStorage if the client needs direct access to the object.

wdym the part already there
image

Then use game.ServerStorage.Maps.HalloweenDropper...

but its go to workspace sometimes

Do you mean that it is cloned, and then placed in tycoons to run?

When the map changing to halloween the part go to workspace