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

Adding onto Values?

Asked by 10 years ago
1if key=="w" then
2        script.Spread.Value=3.5
3    end

How do I change it so that I can make it add instead of = the value?

1 answer

Log in to vote
1
Answered by
BlackJPI 2658 Snack Break Moderation Voter Community Moderator
10 years ago

You need to make it equal the current value, then add on what you want to it:

1if key=="w" then
2    script.Spread.Value = script.Spread.Value + 3.5
3end
Ad

Answer this question