My script is meant to allow players to convert their cash into player points... However I have tried and tried but it never works, could anyone please fix this! This is what I have so far but I can't read the output very well and make sense of it:
points = game:GetService("PointsService")
awardable = points:GetAwardablePoints()
ammount = 10
function onClicked(p)
if awardable >= ammount then
if p.leaderstats.Cash.Value >= 50000 then
p.leaderstats.Cash.Value = p.leaderstats.Cash.Value - 50000
game:GetService("PointsService"):AwardPoints(p.userId,ammount)
end
end
end
script.Parent.MouseButton1Click:connect(onClicked)
THE SCRIPT IS IN A TEXT BUTTON IF YOU NEED TO KNOW

1 comment
I didn't type that up, I used parts of other script to form this one. However thanks for pointing that out I didn't notice!