I am using Fe Gun Kit by Thienbao2109 and want it to where you are in first person when you equip the gun then third person when you unequip it but every time I aim in it just breaks then you can zoom out. Any help would be appreciated.
I Think the culprit lies somewhere here:
function SetADS(ForceDisable)
if not CurrentModule.ADSEnabled then
return
end
local Info
local function Disable()
Info = TweenInfo.new(CurrentModule.TweenLengthNAD, CurrentModule.EasingStyleNAD, CurrentModule.EasingDirectionNAD)
TweenService:Create(Camera, Info, {FieldOfView = 70}):Play()
SetCrossScale(1)
if CommonVariables.ActuallyEquipped then
SetAnimationTrack("AimIdleAnim", "Stop")
SetAnimationTrack("EmptyAimIdleAnim", "Stop")
if CurrentAnimTable.EmptyIdleAnim and CurrentVariables.Mag <= 0 then
SetAnimationTrack("EmptyIdleAnim", "Play", CurrentModule.EmptyIdleAnimationSpeed)
else
SetAnimationTrack("IdleAnim", "Play", CurrentModule.IdleAnimationSpeed)
end
end
viewmodelEvent:Fire("SetAimEnabled", false, CurrentFireMode, CurrentModule.AlignToAimPoint, Info)
viewmodelEvent:Fire("SetViewmodelTransparent", false)
UserInputService.MouseDeltaSensitivity = CommonVariables.InitialSensitivity
CommonVariables.AimDown = false
Preformatted text CommonVariables.Scoping = false
if CurrentModule.HideCrosshair then
TweenService:Create(CurrentCrosshair, Info, {GroupTransparency = 0}):Play()
end
end
if ForceDisable then
Disable()
return
end
if not CommonVariables.Equipped then
return
end
if not CommonVariables.Reloading and not CommonVariables.Overheated and not CommonVariables.HoldDown and not CommonVariables.Switching and not CommonVariables.Alting and not CommonVariables.AimDown and CommonVariables.ActuallyEquipped then
if not CurrentModule.KeepAimingOnReloading then
if CommonVariables.Reloading or CommonVariables.Overheated then
return
end
end
Info = TweenInfo.new(CurrentModule.TweenLength, CurrentModule.EasingStyle, CurrentModule.EasingDirection)
TweenService:Create(Camera, Info, {FieldOfView = CurrentModule.ADSFieldOfView}):Play()
SetCrossScale(CurrentModule.ADSCrossScale)
SetAnimationTrack("InspectAnim", "Stop", nil, 0)
SetAnimationTrack("VMInspectAnim", "Stop", nil, 0)
if CurrentAnimTable.AimIdleAnim then
SetAnimationTrack("IdleAnim", "Stop")
SetAnimationTrack("EmptyIdleAnim", "Stop")
if CurrentAnimTable.EmptyAimIdleAnim and CurrentVariables.Mag <= 0 then
SetAnimationTrack("EmptyAimIdleAnim", "Play", CurrentModule.EmptyAimIdleAnimationSpeed)
else
SetAnimationTrack("AimIdleAnim", "Play", CurrentModule.AimIdleAnimationSpeed)
end
end
viewmodelEvent:Fire("SetAimEnabled", true, CurrentFireMode, CurrentModule.AlignToAimPoint, Info)
UserInputService.MouseDeltaSensitivity = CommonVariables.InitialSensitivity * CurrentModule.ADSMouseSensitivity
CommonVariables.AimDown = true
if CurrentModule.HideCrosshair then
TweenService:Create(CurrentCrosshair, Info, {GroupTransparency = 1}):Play()
end
if not Module.ThirdPersonADS then
Player.CameraMode = Enum.CameraMode.LockFirstPerson
else
if Module.ForceFirstPerson then
Player.CameraMode = Enum.CameraMode.LockFirstPerson
end
end
if CurrentModule.ADSType == "Sniper" then
local StartTime = os.clock() repeat Thread:Wait() if not (CommonVariables.ActuallyEquipped or CommonVariables.AimDown) then break end until (os.clock() - StartTime) >= CurrentModule.ScopeDelay
if CommonVariables.ActuallyEquipped and CommonVariables.AimDown then
viewmodelEvent:Fire("SetViewmodelTransparent", CurrentModule.HideWhenADS)
GUI.Scope.ZoomSound:Play()
CommonVariables.Scoping = true
end
end
else
Disable()
end
end