Questions about tweenservice problems : camera

so you know tweenservice:create right if im not wrong when another tween interferes another then it will cancel the previous one and complete the latest one. this creates a problem for me because i have 2 tweens which are handling the sprint camera fov and the dashing camera fov so if the players fast enough to click then it will cancel the running tween meanwhile the dashing tween is activated

anyone knows whats like an alternative way to do it thanks for reading this post bro

1 Like

I’ve created something like this, a while ago, and I think my solution to it was a debounce. Simply prevent the player from activating or deactivating sprint.

I don’t understand why what you explained is a problem, though. Could you send a video?

the whole problem is that both of the tweens interacts with the fov so if one of it cancels midway it will cause like a weird zooms making it feel not really smooth

Can you explain the mechanics you want a little more? I’m not seeming to understand.

i dont really know how to explain this by words so imma record a video on yt and show it here its really easy to replicate the problem

1 Like

i just uploaded it see if its playable and sorry for bad quality i just uploaded it

I don’t see it. It just looks normal.

like sometimes it feels kinda weird if i dash instantly after i stop sprinting
idk is this placebo

It’s probably because the first tween hasn’t finished, so the second one doesn’t have to travel as far to get to it’s destination. This means it moves slower. My suggestion is to use a little math if you’re having this problem.

Before tweening, determine the distance the tween will have to travel, and modify the duration of tween according to it. If the distance shorter the time is shorter. It would probably look like this:

local duration = math.abs(currentFOV - desiredFOV) * someModifier

o this actually works it feels way smoother now

1 Like

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