Infinite yield possible on 'Players.LiamQ926.Backpack:WaitForChild("Sword") help?
Please provide more explanation in your question. If you explain exactly what you are trying to accomplish, it will be much easier to answer your question correctly.
--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