I've already looked up why things work in studio but doesn't work in server, I couldn't find anything, please help, thank you.
Heres the script:
function MovePlayers()
local Spawnso = game.Workspace.Map.Spawns:GetChildren()
for i, v in pairs(game.Players:GetPlayers()) do
local ToSpawn = math.random(1, #Spawnso)
if v.PlayerGui:WaitForChild("PlayerScreenGui").BackgroundFrame.MessageFrame.TextFrame.Frame.TextButton.WhatColor.Value == "Green" then
wait()
v.Character.HumanoidRootPart.CFrame = Spawnso[ToSpawn].CFrame * CFrame.new(0, 5, 0)
-- the last part is probably not needed but oh well
wait()
end
end
end

1 comment
because roblox thinks the script is fake and something went wrong in the creation of the script