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
01 | player = script.Parent.Parent |
02 | char = player.Character |
03 | mouse = player:GetMouse() |
04 | hold = false |
05 | function keydown(key) |
06 | key = key:lower() |
07 | if key = = "z" then |
08 | hold = true |
09 | bricksize() |
10 | end |
11 | end |
12 |
13 |
14 | function bricksize() |
15 | size = 0 |
I changed a bit around the bricksize function, here you go, this should work.
01 | player = script.Parent.Parent |
02 | char = player.Character |
03 | mouse = player:GetMouse() |
04 | hold = false |
05 | function keydown(key) |
06 | key = key:lower() |
07 | if key = = "z" then |
08 | hold = true |
09 | bricksize() |
10 | end |
11 | end |
12 |
13 |
14 | function bricksize() |
15 | size = 0 |