01 | local plr = game:GetService( "Players" ).LocalPlayer |
02 | local char = ((character and character.Parent ~ = nil and character) or plr.CharacterAdded:wait()) |
03 | if not char or not char.Parent then |
04 | character = plr.CharacterAdded:Wait() |
05 | end |
06 |
07 | local hum = char:WaitForChild( "Humanoid" ) |
08 | local tool = script.Parent |
09 |
10 |
11 | local Left = nil |
12 | local Right = nil |
13 | Left = hum:LoadAnimation(script:WaitForChild( "Left" )) |
14 | Right = hum:LoadAnimation(script:WaitForChild( "Right" )) |
15 |
I'm trying to make it so once you equip the tool then sit on a seat that has a object "Left", a left animation plays. But nothing seems to be working, any advices??
It looks this is a local script as you are using hum:LoadAnimation (only works in localscript) and Tool.Equipped only works on a server script, so copy the code for the event (tool.equipped) into a server script and put the script into the tool.
If this is a server script then do the opposite of what I just said.
I hope this helps!