--Varables
local Form1 = script:WaitForChild("FirstForm")
local equipped = false
local UIS = game:GetService("UserInputService")
local tool = game.Players.LocalPlayer:WaitForChild("Backpack")
local Sword = tool:WaitForChild("Sword")
--Animate
Sword.Equipped:Connect(function()
equipped = true
end)
Sword.Unequipped:Connect(function()
equipped = false
end)
UIS.InputBegan:Connect(function(Input, isChatting)
if isChatting then return end
if Input.KeyCode == Enum.KeyCode.Q and equipped == true then
local Humanoid = Sword.Parent:WaitForChild("Humanoid")
local AnimTrack = Humanoid:LoadAnimation(Form1)
AnimTrack:Play()
end
end
COMMUNITY QUESTION
Infinite yield possible on 'Players.LiamQ926.Backpack:WaitForChild("Sword") help?
0 answers
No public answers were preserved for this question.
This discussion is preserved as it was. New answers, comments, and votes are closed.

3 comments
Next time, please provide more explanation. We're not google, we're not akinator, we're not bots: we won't solve your problem easily without more information.
I don't see any part of the code that puts the sword in the backpack. If another script is supposed to do that, please share that one as well. Otherwise, there is your problem.
The Sword is located in starter pack