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

How do you make a upgrader in a tycoon do times?

I'm making a tycoon and I want to know how to make a upgrader do times then just add how do I do this with a script if anyone can help me?

This is the script I use: script.Parent.Upgrader.Touched:connect(function(Part) if Part:FindFirstChild("Cash") then Part.Cash.Value = Part.Cash.Value + 1 -- Try not to use * because if the game lags, parts may be worth millions each due to debounce end end)

3 comments

0

Please use the codeblock =)

0

First of all: This is super broad, and not clear at all, and just not enough. First of all, write the code in a codeblock, that's why the codeblock was invented, second of all, this seems a lot like a free model.

0

If you want it to do times, then instead of doing + 1 do * 1!!

1 answer

The only way to multiply something the simple way is by using * So it would look like this in your code;

script.Parent.Upgrader.Touched:connect(function(Part)
if Part:FindFirstChild("Cash") then Part.Cash.Value = Part.Cash.Value * 2 -- 2 would be how much its multiplied by

1 comment

0

And lagging would not effect the result in any way ^

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