I cant find what is wrong with it the animation is working fine but the damage and sound wont work heres my damage script and sound script
game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(char) local sound = game.ServerStorage.Punch:Clone() sound.Parent = char:WaitForChild("Head") end) end) game.ReplicatedStorage.Punch.OnServerEvent:Connect(function(player, humanoid) if humanoid.Health >= 10 then humanoid.Health = humanoid.Health - 10 elseif humanoid.Health < 10 then humanoid.Health = 0 end player.Character.Head.Punch:Play() end)
heres my local script
local players = game.Players.LocalPlayer local db = true local damaged = false local anim = Instance.new("Animation") anim.AnimationId = "https//www.roblox.com/asset/?id=3561679592" game.Players.LocalPlayer.Character:WaitForChild("RightHand").Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") and not db and not damaged and hit.Parent.Humanoid == game.Players.LocalPlayer.Character.Humanoid then if game.Players.LocalPlayer.Character.Humanoid.Health > 0 then damaged = true game.ReplicatedStorage.Punch:FireServer(hit.Parent.Humanoid) end end end) game:GetService("UserInputService").InputBegan:Connect(function(input, event) if input.KeyCode == Enum.KeyCode.C and db then db = false local playAnim = game.Players.LocalPlayer.Character:WaitForChild("Humanoid"):LoadAnimation(anim) playAnim:Play() wait (0.8) damaged = false db = true end end)