Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

"Is not a valid member of backpack" error, I need help please (?)

Asked by 2 years ago

Hello!

I am trying to make a tool (with no handle) that makes you dance when you equip It, the problem Is that It does literally nothing

Script:

local Tool = script.Parent
local Troll = Tool.Parent
local CopeAnimationTrack

Tool.Equipped:Connect(function()
    Troll.HumanoidRootPart.Anchored = true
    Troll["Chicken Dance"]:Play()
    CopeAnimationTrack = Troll.Humanoid:FindFirstChild("Animator"):LoadAnimation(CopeDance)
    CopeAnimationTrack:Play()
end)

Tool.Unequipped:Connect(function()
    Troll.HumanoidRootPart.Anchored = false
    Troll["Chicken Dance"]:Stop()
    CopeAnimationTrack:Stop()
end)

Answer this question