I'm trying to make this script work by click the button teleporting the player to the second brick name "Teleporter1". Any suggestions?
local Player = game.Players.LocalPlayer --// Will only work in a LocalScript
local Character = Player.Character
function onClick()
if Character == nil and Character:FindFirstChild("Torso") then
Character.Torso.CFrame = script.Parent.Teleporter1.CFrame + Vector3.new(0, 10, 0)
end
end
script.Parent.ClickDetector.MouseClick:connect(onClick)

1 comment
Use MoveTo: