This script keeps crashing my RBXStudio.
1 | players = { } |
2 | while true do |
3 | for i,v in pairs (game.Players:GetPlayers()) do |
4 | table.Insert(players, v) |
5 | end |
6 | end |
Why?
You need to add a wait() to the while loop, eg
1 | players = { } |
2 | while true do |
3 | for i,v in pairs (game.Players:GetPlayers()) do |
4 | table.Insert(players, v) |
5 | end |
6 | wait() --add a number with any value in seconds. |
7 | end |
No problem.