Default Roblox Hold Animation Delay

I dont really know if this is a Scripting error or not but i think it is because when its like after a while that im in the game it Makes the hold animations become more delayed. this is a video

i dont want it to do this to where its delayed like that can someone please help me these are some scripts that might be doing it

i just tried deleting some script that might be doing it but its js not working please help

1 Like

maybe thats a internet issue, was ur internet laggy at the time

1 Like

nope i tested it multiple times and it did the same thing plus i disabled all the scripts that might be causing it and it was still lagging. i dont think its my wifi cuz im in studio nd also in game it does it

is there any script in the tool related to equipping and unequipping

1 Like

yes there is for the holding animation

but i dont even have to have a gun and it will still delay it the longer im in the game i think

show me the script for the holding anim

Local Script: this is js the unequip and equip

Tool.Equipped:Connect(function()
	isEquipped = true
	equip:Play()
	equip.Stopped:Wait()
	HoldAnim:Play()
end)

Tool.Unequipped:Connect(function()
	isEquipped = false
	isAiming = false
	isShooting = false
	shiftLock(false)
	HoldAnim:Stop()
end)

note this is only for the gun the Magazine and stuff DONT have any scripts in them and also i tested and i js spawned a mag No gun and it still delayed :frowning:

try adding a random tool from toolbox and see if the issue happens with this script

Could we see the shiftlock(false) function because that’s what runs first before stopping the holdAnim,
or you could use a coroutine so it peform multiple tasks,

Tool.Unequipped:Connect(function()
	isEquipped = false
	isAiming = false
	isShooting = false
	coroutine.wrap(shiftLock)(false)
	HoldAnim:Stop()
end)

or have the shiftLock(false) run after holdAnim:Stop()

Tool.Unequipped:Connect(function()
	isEquipped = false
	isAiming = false
	isShooting = false
	HoldAnim:Stop()
    shiftLock(false)
end)

but its not even the gun its the game or something like. i tested multiple times not even spawning a gun into my backpack and then js spawn some ammo for a gun but The ammo tools Dont have anyscripts its js a handle nothing else so its not the gun scripts it gotta be something else. and i dont know what thats y i hopped on dev fourm

i fixed the problem. it was because i did not use task.wait and now its way better now