I'm trying to make a GUI button that when clicked teleports the player 40 studs above from wherever they are...
Here's the script I made for the GUI button...
local player = game.Players.LocalPlayer
function onClicked()
player.Character.HumanoidRootPart.CFrame = player.Character.HumanoidRootPart.CFrame + CFrame.new(0,40,0)
end
script.Parent.MouseButton1Click:Connect(onClicked)
