Tween service not working!

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!
    I need help i don’t know what is wrong, and why it isn’t working. Any tips is helpful please.
  2. What is the issue? Include screenshots / videos if possible!
    I am trying to tween a part to get smaller when the player touches it. But it only works sometimes. Here is a video and as you can see i also have no errors in the output.

Here is the script

No idea if this will help, but instead of doing Tween:Wait() which yields the code, try to do either :Once() or :Connect()

this made it not work everytime :sob: :sob: is there visually anything wrong with my script

I’m pretty sure it’s because you’re checking for the hit inside the for i, v in pathblocks do loop.
The script runs the loop 1 time only, and checks to see if the Touched event happens during the single loop.
If the event doesn’t happen when you run the for i, v loop then it won’t register the Touched event.

ohh that makes sense. So is it the same if i am using collection service does the loop still only run once?

whoops it’s because i didn’t add a debounce. sorry!!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.