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

How to fix "Cash is not a valid member of Player"?

Asked by 4 years ago

Okay so I have this gui I made that will spawn me a car and I press purchase and in the output chat it says "Cash is not a valid member of Player" The script I made and am using is on the following site: https://gyazo.com/3c8effe6c2f862d10738c581a5f2a53a I really need help I really wanna impress my friends so if you could answer my question I would appreciate it very much. Thank you!

1
You more than likely have your cash store in a leaderboard correct?, the leaderboard folder would be a child of local player, so instead youd put localplayer.leaderstats.Cash Si_SenorTN 25 — 4y
0
Please post the script here. Sonnenroboter 336 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago

Line 10 is the problem, you just referenced cash wrong.

1
Wait I'm confused what do you mean referenced Artephious 12 — 4y
1
Nevermind I had to add leaderstats in line 10 near "if game.Players.LocalPlayer.Cash.Value" Artephious 12 — 4y
0
by referenced i meant defined sorry, always glad to help though Si_SenorTN 25 — 4y
Ad

Answer this question