Unable to cast value to function

Am trying to make the vignette zoom in but this error occurs everytime and I have no idea what am wrong rn

portion of the script:

RunService.RenderStepped:Connect(function()
	
	if player:GetAttribute("Stamina") <= 1 then
		player:SetAttribute("IsSprinting", false)
		player:SetAttribute("CantSprint", true)
		TS:Create(hum, TweenInfo.new(RunModule.DecelerationSpeed), {WalkSpeed = RunModule.NormalWalkSpeed}):Play()
		if SFXdebounce == false then
			Vignette:TweenSize(UDim2.new(1,0,1,0),
				Enum.EasingDirection.In,
				Enum.EasingStyle.Exponential,
				0.5,
				true,
				false)
			local BreathingSFXClone = BreathingSFX:Clone()
			SFXdebounce = true
			BreathingSFXClone.Parent = hum.Parent
			if not BreathingSFXClone.IsPlaying then
				BreathingSFXClone:Play()
			end
			task.wait(RunModule.CantSprintTime)
			SFXdebounce = false
			player:SetAttribute("CantSprint", false)
			BreathingSFXClone:Destroy()
		end
	end
	
end)

the last value in TweenSize is supposed to be a function not a boolean, just remove the false and it should work

1 Like

not sure what was i think when creating the tween but thanks!

1 Like

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