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

Making text on a sign add 1 everytime something happens?

Asked by 4 years ago

I want to make a tycoon as practice because I'm a beginner scripter, and I like to work in steps, so I want to make the sign for collecting all money say how much money is in it, although I haven't done anything about actually collecting the money, so I probably need to think that through, too.

0
You also have to attempt it yourself, as this isn't a request site. We will help you improve on your previous attempted code and help you achieve your goal. killerbrenden 1537 — 4y

1 answer

Log in to vote
0
Answered by
sydre 229 Moderation Voter
4 years ago
local sign = script.Parent
local signText = sign.Text
local money = 0

function AddMoney(toAdd)
    money = money + toAdd
    signText.Text = money
end

if that confuses you, you're not ready to script a game yet. There's nothing bad about that, all scripters were at your point once and making a game is one of the best things you can do to learn. But trying to make a game before you even have the basics down will do nothing but hurt your progress as a scripter.

0
Keep working at the game op i hope it goes well royaltoe 5144 — 4y
0
Thanks for the help, I'll try it out, and I have some understanding of functions, just trying to see how to make an event occur if a plate is touched. EthanLovesKittiesYT 2 — 4y
Ad

Answer this question