I made a system where everyone teleport to a map and is given a sword. But the issue is when someone is lagging, they won’t get teleported and is still given a sword, meaning they have the ability to kill anyone in the lobby. Is there anyway to fix this problem? Thank you for reading.
Here is a simplified script that I put for teleporting people:
local AvailableMaps = MapsFolder:GetChildren()
local ChosenOne = AvailableMaps[math.random(1, #AvailableMaps)]
local ClonedMap = ChosenOne:Clone()
ClonedMap.Parent = workspace
local tag = game.ReplicatedStorage:WaitForChild("tag")
tag.Value = ClonedMap.Name
character:FindFirstChild("HumanoidRootPart").CFrame = AvailableSpawnPoints[1].CFrame
table.remove(AvailableSpawnPoints, 1)