Why aren't my animation's playing?
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:
02 | local tool = script.Parent |
03 | local itemEvents = tool.ItemEvents |
06 | itemEvents.Equip.OnServerEvent:Connect( function (player, sound) |
07 | humanoid = tool.Parent.Humanoid |
08 | humanoid:LoadAnimation(script.Equip) |
10 | humanoid:LoadAnimation(script.Idle) |
14 | itemEvents.Unequip.OnServerEvent:Connect( function (player, animationidle, sound) |
16 | for i,c in pairs (humanoid:GetPlayingAnimationTracks()) do |
17 | if c.Animation.AnimationId = = animationidle then |
24 | itemEvents.Swing.OnServerEvent:Connect( function (player, sound) |
25 | humanoid:LoadAnimation(script.Swing) |
26 | wait(tool:WaitForChild( "SwingSoundDelay" ).Value) |
31 | itemEvents.Dealdamage.OnServerEvent:Connect( function (player, otherplayer, sound, value) |
32 | otherplayer.Character.Humanoid:TakeDamage(tool.Damage.Value) |
35 | local tag = Instance.new( "StringValue" ) |
37 | tag.Value = player.Name |
38 | tag.Parent = otherplayer |
40 | tool.Handle.BreakingNoise.PlayOnRemove = true |