How can I disable my "shift to sprint" script once a tool is equipped?

This might be quite simple but I’m not that great of a scripter. Whenever I use the sprinting in my game the animation for the tool I’m using breaks due to the animations mixing in with eachother. Is there a way I can disable the sprinting once a tool is equipped?

Simple but inefficient way:

Tool.Equipped:Connect(function()
   SprintScript.Disabled = true

end)

Tool.Unequipped:Connect(function()
   SprintScript.Disabled = false

end)
2 Likes

You should try to avoid the ‘Disabled’ property if you can. This will cause a bug where you can sprint, equip a tool and maintain the sprint speed.

1 Like

Yes, I know. That’s why I said ‘simple but inefficient’ way