I want to, inside of a proximity.Triggered function, teleport all players that is inside of a part to another part. Could someone help me write that script or tell me how to do it?
game.ReplicatedStorage.TeleportEvent.OnServerEvent:Connect(function(plr,owner) for _, plr in pairs(game.Players:GetChildren()) do --add your position and offsets here local ZOffset = math.random(-5,5) local XOffset = math.random(-5,5) plr.Character.HumanoidRootPart.CFrame = CFrame.new(owner.Character.HumanoidRootPart.Position.X + XOffset, owner.Character.HumanoidRootPart.Position.Y,owner.Character.HumanoidRootPart.Position.Z + ZOffset ) --Position can be changed here end end)
hey you! have you ever heard of enes? if you are in trouble, better call enes!