m = script.Parent r = script.res c = m:Clone() local gui = script.Parent.sur:Clone() function t() if r.Value == false then gui.Parent = game.Players.LocalPlayer.PlayerGui wait(1) script.Disabled = true m:remove() r.Value = true wait(6) script.Disabled = false m = m:Clone() m.Parent = game.Workspace m:makeJoints() r.Value = false end end m.Touched:connect(t)
Basically, when a player touches the model, the model removes and inserts a gui into the Player's gui. Then, after 6 seconds, the model appears again for another player to touch. There are no errors in the Developer Console, but the script wont work.
The problem is you are using a localscript. game.Players.LocalPlayer is only for local scripts, but local scripts only run in the player's character, backpack, or PlayerGui
You will need to use a script, and get the player from the character
Use :GetPlayerFromCharacter
Setting script.Disabled = true is going to stop the running script. It's never going to re-enable itself on line 13.