Debounce issue while making a object move

It now changes color
robloxapp-20220312-1706533.wmv (708.5 KB)

Just some nitpicking on optimization:
You shouldn’t be declaring a new TweenInfo instance for each tween call. You can create just one at the top of the script and reuse it over and over again. The same applies to Color3, and the Vector3 inside the property table

Yea, so said can be done. I was trying to do it fast just to solve his problem though

I put it like this since I haven’t put a deactivation button yet
but it doesn’t work with MouseClick (output says it’s not a valid parent of activatebutton)

so I replaced it with this

Anyways, You fixed it!! Thanks!

But to understand this correctly, what is cooldown for?
and on?

Sorry, i went outside for a bit, cooldown is so that players can’t spam your button and possibly mess up the script!

1 Like

You can remove the cooldown if you find it nessasry!

1 Like

Its okay, but what is Local On? is it like debounce?

Yes it’s a debounce for the script to tell if the slider is down or up

1 Like