Click.MouseButton1Down:connect(function()
--code
end)
I know I need that much(How to make something happen when the Gui is clicked), but how do I access a Player's body part?(like torso head etc)
Click.MouseButton1Down:connect(function()
--code
end)
I know I need that much(How to make something happen when the Gui is clicked), but how do I access a Player's body part?(like torso head etc)
Click.MouseButton1Down:connect(function()
for i,v in pairs(game.Players:GetPlayers()) do
v.Character.Torso.CFrame=Workspace.tele6.CFrame + Vector3.new(0,5,0)--erase --Workspace.tele6 and put where you want them teleported
end
end)
Listen for the event to fire, and then move the player's character.
LocalScript Example
local playerService=game:GetService("Players")
local player=playerService.LocalPlayer
--define click somewhere, I didn't see it in your code
Click.MouseButton1Click:connect(function()
player.Character:MoveTo(VECTOR 3 POSITION)
end)
Make this a local script pl0x.
plr = game.Players.localPlayer
Click.MouseButton1Click:connect(function()
plr:MoveTo( WHERE TO )
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
thanks