local uis = game:GetService("UserInputService")
local char = script.Parent
local humanoidRootPart = char:FindFirstChild("HumanoidRootPart")
local db = false
local humanoid = script.Parent:WaitForChild("Humanoid")
local animationPriority = Enum.AnimationPriority.Action
local animationId = "92306948998386"
uis.InputBegan:Connect(function(input,typing)
if input.KeyCode == Enum.KeyCode.Q and not typing and db == false then
local animation = Instance.new("Animation")
animation.AnimationId = "rbxassetid://" .. animationId
local animationTrack = humanoid:LoadAnimation(animation)
animationTrack.Priority = animationPriority -- Set the animation priority here
animationTrack:Play()
local hitbox = Instance.new('Part')
hitbox.Size = Vector3.new(6, 6, 5)
hitbox.Transparency = 0.9
hitbox.CanCollide = false
hitbox.Massless = true
hitbox.Anchored = true
hitbox.Color = Color3.new(1)
hitbox.CFrame = humanoidRootPart.CFrame * CFrame.new(0, 0, (hitbox.Size.Z/2) * 0 )
hitbox.Parent = workspace
local partsInsideHitbox = workspace: GetPartsInPart(hitbox)
local function hitboxFunction(v)
end
for i, v in pairs (partsInsideHitbox) do
hitboxFunction(v)
end
wait(0.3)
hitbox:Destroy()
print("yay it works :D ")
db = true
task.wait(0.6)
db = false
end
end)