01 | fountain = script.Parent.ParticleEmitter |
02 | debounce = false |
03 | function onTouch() |
04 | if debounce = = false |
05 | then debounce = true |
06 | fountain.Rate = 1000 |
07 | wait( 0.2 ) |
08 | fountain.Rate = 20 |
09 | debounce = false |
10 | end |
11 | end |
12 |
13 | script.Parent.Touched:connect(onTouch) |
How do u do it correctly ? i have no idea where to find how to script the rate thing about particleemitters
If the problem is the rate not looking like it's at 1000, it's because the wait period is too short for it to be seen! C:
Trying setting the wait period higher.
01 | local fountain = script.Parent.ParticleEmitter |
02 | local debounce = false |
03 |
04 | function onTouch() |
05 | if debounce = = false then |
06 | debounce = true |
07 | fountain.Rate = 1000 |
08 | wait( 20 ) |
09 | fountain.Rate = 20 |
10 | debounce = false |
11 | end |
12 | end |
13 |
14 | script.Parent.Touched:connect(onTouch) |