basically, the tween or camera instantly goes back to 70 or normal fov when the tweens ends, but what i’m trying to do is for as long as the key is held down (via the InputBegan) the longer the tween stays at its goal (80 fov) here is the script, (or most of it, i d’ont want people taking it):
--the tweens
local tweenInfoSprint = TweenInfo.new(
.5, -- Time
Enum.EasingStyle.Linear, -- EasingStyle
Enum.EasingDirection.In, -- EasingDirection
0, -- RepeatCount (when less than zero the tween will loop indefinitely)
false, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
local SprintFOVTween = TweenService:Create(Camera, tweenInfoSprint, {FieldOfView = 80})
local tweenInfoSprintStop = TweenInfo.new(
.5, -- Time
Enum.EasingStyle.Linear, -- EasingStyle
Enum.EasingDirection.In, -- EasingDirection
0, -- RepeatCount (when less than zero the tween will loop indefinitely)
false, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
--!!! removed some of the code because i dont want anyone to take it, (selfish, right?)
another non major but annoying error is that the second tween (the one that tweens back to 70) wont play
local tweenInfoSprintStop = TweenInfo.new(
.5, -- Time
Enum.EasingStyle.Linear, -- EasingStyle
Enum.EasingDirection.In, -- EasingDirection
0, -- RepeatCount (when less than zero the tween will loop indefinitely)
false, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
to
local tweenInfoSprintStop = TweenInfo.new(
.5, -- Time
Enum.EasingStyle.Linear, -- EasingStyle
Enum.EasingDirection.InOut, -- EasingDirection
0, -- RepeatCount (when less than zero the tween will loop indefinitely)
false, -- Reverses (tween will reverse once reaching it's goal)
0 -- DelayTime
)
I’ve tested the script myself into an entirely empty game, it works perfectly and with no errors, the script you’re showing doesn’t have any sort of problem.
you should check some of your scripts that might be interfering with the FOV of the Camera.