Im trying to make it where if "On" is clicked it Teleports you to a certain point In Game but right now it is not Working, Any Help?
function click(mouse) local human = game.Players:GetChildren() if human then local humanoid = human:findFirstChild("Humanoid") if humanoid then human.Torso.CFrame = CFrame.new(-47.52, 106.53, 40.24) end end end script.Parent.MouseButton1Down:connect(click)
human
in your code is a Table, not a specific Player. Additionally, the Player's Character is where their physical parts - limbs and the Humanoid - are stored, not the Player itself.
I'm assuming this is a LocalScript:
function click(mouse) local human = game.Players.LocalPlayer.Character if human then local humanoid = human:findFirstChild("Humanoid") if humanoid then human.Torso.CFrame = CFrame.new(-47.52, 106.53, 40.24) end end end script.Parent.MouseButton1Down:connect(click)