Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Should this code be put into a normal script or a local script and what's the difference?

while wait(30) do for _,Player in pairs(game.Players:GetPlayers()) do if Player:FindFirstChild("leaderstats") then Player.leaderstats.Points.Value = Player.leaderstats.Points.Value+11 end end end

2 comments

0

it can be either i think. Local scripts are for when you're calling game.Players.LocalPlayer. is your script not working? also use a code block for code, the Lua button when you're asking a question

0

Thank you, and yes the code works in either script. However, I just wanted to know which would be more effective.

1 answer

✓ Accepted answer

Think of the client (what LocalScripts run on) as a single player's computer, whilst the server (normal scripts) is what the actual place runs on.

So, therefore, the client should only edit a single player.

This means your script should be a normal script.


Hope I helped!

~TDP

This discussion is preserved as it was. New answers, comments, and votes are closed.