I have this script that teleport people to a block and I have made a seperate script that puts a boolvalue into the character and can be turned on or off with a gui, How would I check to see if the boolvalue is true or false?
_G.StartingPlaces = {"StartingPlaceOne","StartingPlaceTwo","StartingPlaceThree","StartingPlaceFour","StartingPlaceFive","StartingPlaceSix"}
for LoadGlobalTable = 1,#_G.StartingPlaces do
print(_G.StartingPlaces[LoadGlobalTable].."Loaded")
end
while true do
for timewait = 25, 0, -1 do
wait(1)
game.Workspace.Timer.SurfaceGui.Time.Text = timewait
end
game.Workspace.Timer.SurfaceGui.Time.Text = "Time"
--
s = game.Workspace.Spawns
p = game.Players:GetChildren()
for PlayerTeleport = 1, #p do --Where it teleports, so where it needs to decide if the value is true or not
if game.Workspace:FindFirstChild(p[PlayerTeleport].Name) then
p[PlayerTeleport].Character.Torso.CFrame = s[_G.StartingPlaces[math.random(1,#_G.StartingPlaces)]].CFrame * CFrame.new(0,8,0)
end
script.Parent.NumberOfPeopleInGame.Value = #p
script.Parent.PeopleInGame.SurfaceGui.PeopleInGame.Text = "People in game:"..#p
end
end

3 comments
I see, But it errored and said it tried to access "PlayerTeleport" a number value
Replace PlayerTeleport with whatever you need, I only put that because I saw it in your script.
well I think that'd be correct cause I need to replicate it across everyone in the server hence "PlayerTeleport" is "i =" in a for loop