Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why does my teleport TextButton script only work in studio?

In roblox studio, I made a teleport script. Then when I played it, it did not work. Here is my code:

script.Parent.MouseButton1Click:connect(function()
game.Players.LocalPlayer.Character.Torso.CFrame = CFrame.new(Here is the position, I forgot the numbers)
end

2 answers

✓ Accepted answer

Check that you're using a LocalScript, not just a regular script.

Make sure you're referring to PlayerGui, not StarterGui.

This discussion is preserved as it was. New answers, comments, and votes are closed.