Hello there, I'm trying to work with tweens, and it's coming along pretty well, I only have 1 problem:
Objects behave very weird when I put a touch script in them, whili I'm tweening them.
I'm a learning scripting but I don't know what I've done wrong, when the object is being tweened with a touch script inside of it, it immediately stops the tween if it touches a part, or randomly glitches above a part
(With touch script I mean something like this:
script.Parent.Touched:Connect(function() print("Hello world!") end)
)
Anyway, does someone know what I've done wrong, and how I could fix this, thanks for your help! And sorry for my bad English, I'm Dutch myself and my English is pretty bad!
It's probably playing multiple times on the touch due to a lack of debounce.
local debounce = false local delay = 3 -- how much time between touches. script.Parent.Touched:Connect(function() if debounce ~= true then debounce == true print("Hello world!") wait(delay) debounce = false end end