Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Am I doing something wrong with this Money GUI?

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

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.

2 comments

0

Change it to what

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.