script.Sell.OnServerEvent:connect(function(plr,v,i)
plr.Data.Money.Value = plr.Data.Money.Value + v.Info.Sell.Value
if v.Info.Number.Value > 1 then
v.Info.Number.Value = v.Info.Number.Value -1
end
if v.Info.Number.Value == 1 then
v:remove(i)
end end)

3 comments

0

u might wanna use the operator ~=, just maybe.

0

:remove is deprecated, i'm not sure if it still works, but try using :Destroy() instead just maybe

0

its still working