First of all the script only runs once in the whole entire time you play the game.
For the script to check if a value is true, you want the script to load the animations only when the boolean is changed.
So we should make a changed event.
1 | script.Parent.PlayOverhead.Changed:connect( function () |
2 | if script.Parent.PlayOverhead.Value = = true then |
3 | game.Players.LocalPlayer:WaitForChild( "Character" ):WaitForChild( "Humanoid" ) |
4 | :LoadAnimation(script.Parent.OverheadAnim 2 ) |
5 | game.Players.LocalPlayer:WaitForChild( "Character" ):WaitForChild( "Humanoid" ) |
6 | :PlayAnimation(script.Parent.OverheadAnim 2 ) |