BE.TPPlayers.Event:Connect(function()
local players = Players:GetPlayers()
for i, v in pairs(players:GetChildren()) do -- Error Here
if v:FindFirstChild("Values") then
if v.Values.InSubway.Value == true then
-- Teleport Players that have this value set to true
else
-- Don't Teleport Players that have this value set to false
end
end
end
end)
I want to be able to teleport players only if the InSubway.Value
is set to true
.
If it’s not true
then they wont be teleported.
This is a server script. Does it need to be local?
Any help is appreciated!