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

(URGENT) Why is my Cash scripts not working at all.? (UTGENT) [closed]

Asked by 6 years ago
Edited 6 years ago

Please encode Lua code in the Lua block code tag (look for the Lua icon in the editor).

I made this script and it dosent work help

01game.Players.PlyerAdded:connect(function( PLAYER )
02PLAYER:WaitForDataReady().
03local stats = Instance.new("IntValue")
04stats.Name = "leaderstats"
05local cash = Instance.new("IntValue")
06cash.Name = "Cash"
07cash.Value = 0
08cash.Parent =stats
09stats.Parent = PLAYER,
10if PLAYER:LoadNumber("A") then
11cash.Value = PLAYER:LoadNumber("A")
12end
13end)
14game.Players.PlayerRemoving:connect(function( PLYR )
15PLYR:SaveNumber("A", PLYR.leaderstats.Cash..Value),
16end)

i fixed it the code now pls help

1
You don't have to mark your titles as "Urgent". Someone is always able to help. Although you should actually provide us the convenience of properly formatting your code inside of a code block. xPolarium 1388 — 6y
1
You're also using a deprecated method of data saving. See DataStoreService as it is a much better way to save player data. You should also look over your code as you have syntax spelling mistakes and random periods/commas. xPolarium 1388 — 6y

Closed as Too Broad by User#19524

This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.

Why was this question closed?