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

Adding onto Values?

Asked by 9 years ago
if key=="w" then
        script.Spread.Value=3.5
    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
9 years ago

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

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

Answer this question