The damage works fine but the animation doesn't for mobile users
Btw this is a script for a Sword
``lua
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local debounce = false
local canDamage = false
local cooldownLength = 0.5
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://13316989854"
script.Parent.Activated:Connect(function()
if debounce == false then
debounce = true
canDamage = true
character.Humanoid:LoadAnimation(animation):Play()
wait(cooldownLength)
debounce = false
end
end)
script.Parent:WaitForChild("Handle"):WaitForChild("Blade").Touched:Connect(function(hit)
if canDamage == false then return end
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if canDamage == true then
canDamage = false
humanoid:TakeDamage(10)
end
end)
``
** You are now Level 1! **