wait(1) local spawn = script.Parent spawn.Touched:connect(function(hit)
game.Players.LocalPlayer.Character.Torso.CFrame=CFrame.new(Vector3.new(192.713, 7.374, -898.129))-- Teleport end)
thats the code, but it only works when im in studio mode. when i play the real game out oif studio mode it doesnt teleport me why??

3 comments
Use code blocks. I also recommend using auto correct when writing things to the public.
Also, when posting scripts, I recommend telling people if it is a module script, a server script, or a local script.
LocalPlayer can only be used from a local script. Use GetPlayerFromCharacter instead