Im trying to teleport the player when they click the button but it's not working any help?
code:
script.Parent.MouseButton1Click:Connect(function() game.Players.LocalPlayer.Character.LowerTorso.CFrame = CFrame.new(workspace.Part.Position) end)
I am certain that your script works:
script.Parent.MouseButton1Click:Connect(function() game.Players.LocalPlayer.Character.LowerTorso.CFrame = CFrame.new(workspace.Part.Position) end)
Please check if you are using a LocalScript which is under the textbutton since specified in the first line which isscript.Parent.MouseButton1Click:Connect(function()
And also check if your Using R15 specified in the 3rd line game.Players.LocalPlayer.Character.LowerTorso.CFrame
whilst R15 having LowerTorso(s). And lastly, make sure your Part exists in the workspace!
Try to rename your part to a specify name.
script.Parent.MouseButton1Click:Connect(function() game.Players.LocalPlayer.Character.LowerTorso.CFrame = CFrame.new(game.Workspace.name.Position) end)
I think that should work for you. Also, don`t forget to change line 3 name to a name with which you renamed your part.