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

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

Asked by 7 years ago

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)

0
Please use the codeblock =) DaCrazyDev 444 — 7y
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. DaCrazyDev 444 — 7y
0
If you want it to do times, then instead of doing + 1 do * 1!! DaCrazyDev 444 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

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
0
And lagging would not effect the result in any way ^ Spenserm10 5 — 7y
Ad

Answer this question