Can someone please help me fix this, I've tried many things but it's not working;
local p = game:GetService("PlayerPointService") local player = script.Parent.Parent local bankBalance = player.Bank.Value
if bankBalance == 1 then p:AwardPoints(player.userId,45) print("point awarded") while true do wait() bankBalance = 0
if bankBalance == 5 then p:AwardPoints(player.userId,125) print("points awarded") while true do wait() bankBalance = 0
if bankBalance == 10 then p:AwardPoints(player.userId,500) print("points awarded") while true do wait() bankBalance = 0
end end end end end end
Just some misspelling here I've did it for you!
local p = game:GetService("PlayerPointService") local player = script.Parent.Parent local bankBalance = player.Bank.Value if bankBalance == 1 then p:AwardPoints(player.userId,45) print("Points Awarded") while true do wait() bankBalance = 0 if bankBalance == 5 then p:AwardPoints(player.userId,125) print("Points Awarded") while true do wait() bankBalance = 0 if bankBalance == 10 then p:AwardPoints(player.userId,500) print("Points Awarded") while true do wait() bankBalance = 0 end end end end end end
If this helped +1
Both of you got Line 1 wrong...
local p = game:GetService("PointsService") local player = script.Parent.Parent local bankBalance = player.Bank.Value --PointsService, not PlayerPointService if bankBalance == 1 then p:AwardPoints(player.userId,45) print("Points Awarded") while true do wait() bankBalance = 0 if bankBalance == 5 then p:AwardPoints(player.userId,125) print("Points Awarded") while true do wait() bankBalance = 0 if bankBalance == 10 then p:AwardPoints(player.userId,500) print("Points Awarded") while true do wait() bankBalance = 0 end end end end end end