So I made this and don't really understand why it works in studio and not on my game. I'm unsure how I would get it to work. As of now it's in a normal script and not a local, though that's probably the problem. Though when I put it in a local script it still did not work. Eh, I'm clueless anyhow.
script.Parent.Touched:connect(function(Hit) local Player = game.Players:GetPlayerFromCharacter(Hit.Parent) local humanoid = Hit.Parent:FindFirstChild("Humanoid") if Player then Player.PlayerScripts.ControlScript.Disabled = true humanoid:MoveTo(workspace.EndPlate.Position) wait(10) Player.PlayerScripts.ControlScript.Disabled = false end end)
Check if your on filtering enabled.
Servers cannot access PlayerScripts, consider making this local. eg.
game.Workspace.Button.Touched:connect(function(Hit) if Hit.Parent.Name == game.Players.LocalPlayer.Name then if game.Players.LocalPlayer.Character then game.Players.LocalPlayer.PlayerScripts.ControlScript.Disabled = true game.Players.LocalPlayer.Character.Humanoid:MoveTo(workspace.EndPlate.Position) wait(10) game.Players.LocalPlayer.PlayerScripts.ControlScript.Disabled = false end end end)