Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 7 years ago

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

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 RobloxianDestory 262 — 7y
0
Thank you, and yes the code works in either script. However, I just wanted to know which would be more effective. Michael_TheCreator 166 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

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

Ad

Answer this question