local players = Players:GetPlayers()
for i, v in pairs(players) do
if v:FindFirstChild("Values") then
if v.Values.InSubway.Value == true then
local clone = FlashLight:Clone()
clone.Parent = v.Backpack
v.Character.Humanoid.Jump = true
v.Character.Humanoid.WalkSpeed = 12
v.Character.Humanoid.JumpPower = 0
task.wait(0.1)
BE.UnWeldSeats:Fire()
task.wait(0.05)
v.Character:PivotTo(TPPart.CFrame)
else
end
end
end
This script is meant to teleport all the players that have the InSubway value set to true. But when my friend and I test it, and the InSubway value is set to true, it only teleports me, instead of both.
Try debugging with print statements to see where the script stacks. Also, if you set the players variable before any player has joined the server, it will not get all the players when iterating through it.