✓ Accepted answer
So I generally avoid setting position or anything in the workspace on the client using a local script, but the player position is an exception to filtering enabled, so you could just do this:
script.Parent.MouseButton1Click:Connect(function()
local char=game.Players.LocalPlayer.Character
char.HumanoidRootPart.CFrame=game.Workspace.Point.CFrame*CFrame.new(0,5,0)
end)
It works but is pretty sloppy, just changes the position of the player,sometimes that is all you want, but I doubt that, ppl could also spam the teleport and what not, and later on you might want to say a player needs a certain amount of money to tp or a certain item or a certain level, and putting any of that on the client is too risky, could result in something like, only the player who clicked sees changes, and would let hackers get through easier.
1 comment
i think its because your putting a vector3 value inside a cframe value and vector3 is i think size