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)
TP = workspace["THEPARTYOUWANTTOTELEPORTTO"] function onClicked() local c = game.Players:GetChildren() for i = 1, #c do c[i].Character:MoveTo(TP.Position) end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
Replace + Vector3.new(0, 10, 0)
with * CFrame.new(0, 10, 0)
Also replace Character == nil
with Character ~= nil