1 | function clikk() |
2 | game.Player.LocalPlayer.Character.Torso.CFrame = CFrame.new( 1 , 10 , 10 ) |
3 | end |
4 | script.Parent.ClickDetector.MouseClick:connect(clikk) |
It won't teleport the player who clicked the part or brick. I only WANT to teleport the player who clicked it, NOT all the players in the server
this has to be in a Server Script, not a local script
1 | function clikk(hit) |
2 | local player = game.Workspace:FindFirstChild(hit.Name) -- the player's model who clicked |
3 | player.Torso.CFrame = CFrame.new( 1 , 10 , 10 ) |
4 | end |
5 | script.Parent.ClickDetector.MouseClick:connect(clikk) |