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

Am I doing something wrong with this Money GUI?

Asked by 8 years ago

I am trying to make a Money GUI show how long until you get the money, but so far it's not working. Can anyone tell me if I did something wrong, and if so what?

local award = 50
local defwait = 120

local wait = 120

local player = script.Parent.Parent.Parent.Parent

while wait(1) do
    if wait > 0 then
        wait = wait - 1
        script.Parent.Text = "You will recieve $"..award.." in "..wait.." seconds."
    else
        script.Parent.Text = "Awarding money.."
        player.leaderstats.Money.Value = player.leaderstats.Money.Value + award
        wait(.50)
        wait =  defwait
    end
end

1 answer

Log in to vote
0
Answered by 8 years ago

Well, problem with this is that "wait" is a built in function of RBX.lua. You mite want to change it and see if it works.

0
Change it to what ISellCows 2 — 8y
0
Anything, I was going suggest "time" but that is also a built in function :/ It's a variable so it doesn't matter what you call it. BobserLuck 367 — 8y
Ad

Answer this question