local frame = script.Parent local httpService = game:GetService('HttpService') local template = script.Parent:WaitForChild('Template') local tableOfPlayers = game.ReplicatedStorage.Values.TableOfPlayers local decoded = httpService:JSONDecode(tableOfPlayers.Value) local inRound = game.ReplicatedStorage.Values.InRound local function checkForTable(table_, value) for i, v in pairs(table_) do if v == value then return true else return false end end end inRound.Changed:Connect(function() if inRound.Value == false then script.Parent.Visible = false else script.Parent.Visible = true end end) local cor = coroutine.create(function() while true do for i, plr in pairs(game.Players:GetPlayers()) do if checkForTable(decoded, plr.Name) and plr.ListedOnHealth.Value == false then local newTemp = template:Clone() newTemp.Name = plr.Name newTemp.Visible = true newTemp.Parent = table elseif not checkForTable(decoded, plr.Name) and plr.ListedOnHealth == true then local frame = script.Parent:FindFirstChild(plr.Name) frame:Destroy() end end print(decoded) wait(0.01) end end) coroutine.resume(cor)
I can't find the problem. Any help would be appreciated. this is a local script
The only reason why your script works solo, is because that it's a LOCAL script. It happens only on the LOCAL player, that runs the script. You should be able to solve this by copying your code, and pasting it into a regular script in ServerScriptService or Workspace. OR you could just enable API Servers.
make sure you have enabled all services and use a normal script and Published your place.
Make sure it's not a local script and enable API servers. Or just test it in game.