Animation isn't playing when unequipped?
How do I make the animation play when the tool un-equips? I have a print that tells when it plays, but it isn't at all. No errors were showing, and no prints were showing (except the Humanoid error, but that doesn't matter. Animation still works.)
Code Leading to the tool:
2 | local tool = script.Parent |
3 | local player = game.Players.LocalPlayer |
4 | local Character = player.Character |
5 | local players = game:GetService( "Players" ) |
6 | local SG = game:GetService( "StarterGui" ) |
Note: I can't remove Tool = script.Parent and local tool = script.Parent or it'll break.
Unequipped code:
01 | Tool.Unequipped:Connect( function () |
02 | local animation = Instance.new( "Animation" ) |
03 | animation.Name = "Idle" |
05 | local animTrack = tool.Parent.Humanoid:LoadAnimation(animation) |
07 | print ( "I'm working on it!" ) |
08 | game.Lighting.Bloom.Enabled = false |
09 | game.Lighting.ColorCorrection.Enabled = false |
10 | game.Lighting.Ambient = Color 3. new( 0 / 255 , 0 / 255 , 0 / 255 ) |