Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why aren't my animation's playing?

Asked by
1JBird1 64
3 years ago

So I've been trying to make a working melee weapon, and so far it isn't working, can someone help me out here?

I have a local script that sends a message through a remote event to the this script when ever an action is done (e.g. equipped) the only thing sent through the remote event is the sound.

I also believe the script doesn't deal any damage to the player it hits.

if the local script is needed I can also show that too.

heres the script:

01-- variables
02local tool = script.Parent
03local itemEvents = tool.ItemEvents
04 
05-- server event when item is equipped
06itemEvents.Equip.OnServerEvent:Connect(function(player, sound)
07    humanoid = tool.Parent.Humanoid
08    humanoid:LoadAnimation(script.Equip)
09    sound:Play()
10    humanoid:LoadAnimation(script.Idle)
11end)
12 
13-- server event when item is unequipped
14itemEvents.Unequip.OnServerEvent:Connect(function(player, animationidle, sound)
15    sound:Play()
View all 43 lines...

1 answer

Log in to vote
0
Answered by 3 years ago

It's because you're not playing the animations. You just loaded them.

Line 08:

1humanoid:LoadAnimation(script.Equip):Play()

Line 10:

1humanoid:LoadAnimation(script.Idle):Play()
0
oh yeah, i forgot about that. Good too know for next time, thanks! 1JBird1 64 — 3y
Ad

Answer this question