Teleport All Players
local button = script.Parent
local player = game.Players.LocalPlayer
if player.Name == "Player1" or player.Name == "Player2" then
button.Visible = true
else
button.Visible = false
end
button.MouseButton1Click:Connect(function()
game.ReplicatedStorage.TeleportEvent:FireServer()
end)
game.ReplicatedStorage.TeleportEvent.OnServerEvent:Connect(function(owner)
for _, plr in pairs(game.Players:GetChildren()) do
--add your position and offsets here
plr.Character.HumanoidRootPart.CFrame = CFrame.new(owner.Position) --Position can be changed here
end
end)