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

Can anyone help me with Kill for Cash system? [closed]

Asked by 5 years ago

I killed a NPC, my cash is 850 Next, I buy a sword in shop [Costs 650 Cash] then I kill the NPC My currency changed to 1100 (850 +250) idk why .-.

01local Humanoid = script.Parent.Humanoid
02function PwntX_X()
03local tag = Humanoid:findFirstChild("creator")
04if tag ~= nil then
05if tag.Value ~= nil then
06local Leaderstats = tag.Value:findFirstChild("leaderstats")
07if Leaderstats ~= nil then
08Leaderstats.Exp.Value = Leaderstats.Exp.Value + 250
09Leaderstats.Coins.Value = Leaderstats.Coins.Value + 250
10wait(0.1)
11script:remove()
12end
13end
14end
15end
16Humanoid.Died:connect(PwntX_X)
0
Its likely because you never subtracted the 650 when you bought the sword. Though it's hard to tell since you haven't provided the purchasing script. climethestair 1663 — 5y
0
Nice free model. programmerHere 371 — 5y

Closed as Not Constructive by programmerHere, WideSteal321, and royaltoe

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?