While trying to make a round-based game, I came across a problem in the following script:
local plrs = game.Players:GetChildren()
for i = 1, #plrs do
local char = plrs[i]:FindFirstChild("Character")
if char then
char.HumanoidRootPart.CFrame = workspace.gameSpawn.CFrame
print("true fam")
end
end
When playing the game, my player's Character is not having its CFrame changed. "true fam" is not printed even when my player's Character is fully loaded. Please help if you know how this problem is occurring.
No, this code is not inside a LocalScript. It's in a server script in ServerScriptService.

3 comments
exactly why it wont work
i tested to see if not char, and the code in that processed. basically, the player's character is not being referred to with the local char variable for whatever reason
as I said.