Simple my animation script shows no errors but the animation is still not playing its confusing can u tell me wuts wrong? Local script:
local Hit = false local cooldown = false script.Parent.Activated:Connect(function() if cooldown == false then cooldown = true print("ok") local player = game.Players.LocalPlayer local Char = player.Character:FindFirstChild("Humanoid") local animation = Instance.new("Animation") animation.AnimationId = "rbxassetid://04848001315" local AnimationLoad = Char:LoadAnimation(animation) AnimationLoad:Play() Hit = true wait (0.5) Hit = false wait (1) cooldown = false script.Parent.Sword.Touch.Touched:Connect(function(part) print("yo") if Hit == true then game.ReplicatedStorage.Tag:FireServer(part.Parent) game.ReplicatedStorage.Ow:FireServer(part.Parent) end end) end end)
Also can u help me with my damage script? it keeps showing a error of the humanoid not being a child of the character so im confused Script =
game.ReplicatedStorage.Ow.OnServerEvent:connect(function(Character) Character.Humanoid.Health = Character.Humanoid.Health - script.Parent.Value
For the damage, you need to put this:
script.Parent.Touched:Connect(function(character) if character.Parent.Humanoid then character.Parent.Humanoid.Health = 0 end end
The code would have worked, but it probably got the lower leg and searched for a humanoid in the lower leg. As for the animation, try putting it in a server script.