alright so. i'm trying to make a teleport gui for my game. i whipped up what i thought would work, using examples from the wiki, but it doesn't seem to work. it's a local script.
target = CFrame.new(-420, 94, 531)
function parentPressed()
game.Workspace.Player.HumanoidRootPart.CFrame = target
end
script.Parent.MouseButton1Down:connect(parentPressed)
here it is. thank you in advance!

8 comments
doesn't work, with or without the spaces (spaces are supposed to be there, its on the wiki, but I did try both)
Hmm ill test it myself then!
In that case Ill try make a model for you and Ill send the link
I see the problem! The position isn't possible! You can't teleport a player to a place which isnt even real! In my opinion place a part where you want the player to get teleported to and copy and paste the position of that part into the script I gave you
Scrap this, I did it wrong. Let me re-write it completely
No no no I did it wrong I thought it wasnt possible but I didnt even write the position into the script XD
it works now, ty! big part of my project, this really helped
No problem feel free to ask me anything else!