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

Anyone willing to help?

Asked by
ehern11 15
10 years ago

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

0
a) What does "not working mean". b) What have you tried c) Use code formatting (the Lua button). Edit your post to address all of these as soon as possible. BlueTaslem 18071 — 10y

2 answers

Log in to vote
0
Answered by
Mauvn 100
10 years ago

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

Ad
Log in to vote
0
Answered by 10 years ago

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

Answer this question