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

Why isn't this size improver script not working when the value is over 20?

Asked by 8 years ago

When size is more then 20 its supposed to print("Over 20") why isn't it working? When it is over 20 it doesnt do anything instead the value of size keeps going.Test it and you will see

01player = script.Parent.Parent
02char = player.Character
03mouse = player:GetMouse()
04hold = false
05function keydown(key)
06    key = key:lower()
07    if key == "z" then
08        hold = true
09        bricksize()
10    end
11end
12 
13 
14function bricksize()
15    size = 0
View all 40 lines...

1 answer

Log in to vote
0
Answered by 8 years ago

I changed a bit around the bricksize function, here you go, this should work.

01player = script.Parent.Parent
02char = player.Character
03mouse = player:GetMouse()
04hold = false
05function keydown(key)
06    key = key:lower()
07    if key == "z" then
08        hold = true
09        bricksize()
10    end
11end
12 
13 
14function bricksize()
15    size = 0
View all 40 lines...
0
Nothing changed coolg5555 70 — 8y
0
Weird, when I tested it reached 21 then said"OVer 20" and did not continued. Did you have it in StarterGui? aaron8888 3 — 8y
Ad

Answer this question