Tokimonu
|
  |
| Joined: 18 Sep 2009 |
| Total Posts: 643 |
|
|
| 26 Feb 2015 09:51 PM |
local part = script.Parent local screen = part.Parent:FindFirstChild("screen")
debounce = false
part.Touched:connect(function(hit) debounce = true local num = screen.num num.Value = num.Value + 1 end)
part.TouchEnded:connect(function(hit) debounce = true local num = screen.num num.Value = num.Value - 1 end)
debounce = false
Basically, when the player steps on, it adds +1 to the value, then when they step off, it subtracts -1 from the value, and when you go anywhere near it the value goes to -10, and then subtracts slowly?
I tried adding debounce but it wouldn't work. |
|
|
| Report Abuse |
|
|
Tokimonu
|
  |
| Joined: 18 Sep 2009 |
| Total Posts: 643 |
|
| |
|
|
| 26 Feb 2015 09:56 PM |
| You didn't add the debounce correctly. |
|
|
| Report Abuse |
|
|
Tokimonu
|
  |
| Joined: 18 Sep 2009 |
| Total Posts: 643 |
|
|
| 26 Feb 2015 09:58 PM |
| How do you do it correctly? |
|
|
| Report Abuse |
|
|
|
| 26 Feb 2015 09:59 PM |
| http://wiki.roblox.com/index.php?title=Debounce |
|
|
| Report Abuse |
|
|