Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

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

Asked by 3 months ago
Edited 3 months 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 3 months 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 3 — 2mo
0
Could i see the whole script? Hugo_XPGamer 4 — 2mo
Ad

Answer this question