I have this script, which is in a folder, which is in a part in workspace. When I click on play, nothing happens at all and the output remains empty. It does not even print out 0. May someone please tell me what's wrong. This is my script.
for _, player in pairs(game:GetService("Players"):GetPlayers()) do
print(player:DistanceFromCharacter(Vector3.new(0, 0, 0)))
end

2 comments
When you click play, the server loads up, your script runs. Then, your character spawns in. So when this script runs, game.Players has nothing in it. Hook it up to the PlayerAdded event or wait() a little bit before the loop.
Thanks.