Right now, the problem I am currently having is that my tool animations won’t work, and I’m considering that it may either be the player tool animation or the script itself, I’ll include the script below
local character = game:GetService("Players").LocalPlayer.Character
local tool = script.Parent
local animation = tool:WaitForChild("Animation")
local animationTrack = character.Humanoid:LoadAnimation(animation)
local canRun = true
local debounceTime = 1
tool.Activated:Connect(function()
if canRun then
canRun = false
animationTrack:Play()
wait(debounceTime)
canRun = true
end
end)
(yes, this was a copy-pasted script with additional changes)
I have tried multiple ways on the script, but just about every time, it will stay in the same pose or form of character. I’ve watched videos and gone through some forums, but none have worked so far
The item is cloned and then put into the player’s backpack from Replicated Storage
local character = game:GetService("Players").LocalPlayer.Character
local tool = script.Parent
local animation = Instance.new("Animation")
local animationTrack = character.Humanoid:LoadAnimation(animation)
animationTrack.Priority = Enum.AnimationPriority.Action2
local canRun = true
local debounceTime = 1
tool.Activated:Connect(function()
if canRun then
canRun = false
animationTrack:Play()
wait(debounceTime)
canRun = true
end
end)
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local tool = script.Parent
local animation = tool:WaitForChild("Animation")
local animationTrack = character.Humanoid:LoadAnimation(animation)
animationTrack.Priority = Enum.AnimationPriority.Action2
local canRun = true
local debounceTime = 1
tool.Activated:Connect(function()
if canRun then
canRun = false
animationTrack:Play()
wait(debounceTime)
canRun = true
end
end)