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

Why does this script not show the money added for other players on the leaderboard?

Asked by 5 years ago
Edited 5 years ago

I have no idea why but my script when it gives the cash it dosent show up for other players on the leaderstats why is that?

Script : `wait(4)

while wait(0.5) do

if game.Players.LocalPlayer.Character.HumanoidRootPart.Velocity.Magnitude >= 40

then

wait(0.2)

game.Players.LocalPlayer.leaderstats.Cash.Value = game.Players.LocalPlayer.leaderstats.Cash.Value + 25

end

end`

1 answer

Log in to vote
0
Answered by 5 years ago

The simple answer to that is you are using local player. When using local player the thing your trying to script only shows for that certain person. When in a local script just use remote events.

When adding cash you would want to insert remote events

Sorry being a bit late. Hope this helps!

0
Thanks for the answer but i think there is a problem with this line : game.Players.LocalPlayer.leaderstats.Cash.Value = game.Players.LocalPlayer.leaderstats.Cash.Value + 25 . And i dont know whats wrong is it cuz its a LocalPlayer? DaggerSaber 14 — 5y
0
Could i see the whole script? Hugo_XPGamer 8 — 5y
Ad

Answer this question