i have this script i want to teleport a player when they click a button but i cant seem to figure out how to go about this any help
Here is the script:
script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Parent.Parent.Parent.PlayerStats.Intro.Value == 0 then
local player = game.Players.LocalPlayer
player.Character.Position = Vector3.new (20,20,29)
else
wait()
end
end)
thanks in advance!
(if your wondering why i have a else there with a wait its so that something else happens when they click it and their value isn't 0 anymore, which will happen after the first time they click the button. im going to do that after i finish the first half of the script but i know how to do that and im just wondering how to do the first bit.)

1 comment
You can move a Character with :MoveTo(Vector3)