Log in to vote

regen script that take your money wont work?

Asked by 4 days ago

what im trying to do is making a regen script that takes away your money before it regens the part/model here is the script i made

location = script.Parent.Parent.Parent regen = script.Parent.Parent save = regen:clone() local price = 5 -- The price of your item. local db = true script.Parent.ClickDetector.MouseClick:connect(function(player) if player.leaderstats.Cash.Value >= price then player.leaderstats.Cash.Value = player.leaderstats.Cash.Value - price db = false

function onClicked() regen:remove() local back = save:clone() back.Parent = location back:MakeJoints() db = true end


it may be absolutely wrong but im also a beginner

What part of it does not work, if it gives an error what does it say Trongaming3211 7 — 4d

Answer this question