local player = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("humanoid")
local uis = game:GetService("UserInputService")
local anim = Instance.new("Animation")
anim.AnimationId = "rbxassetid://5255215899"
function onKeyPressed (inputObject,gameProcessEvent)
if inputObject.KeyCode == Enum.KeyCode.Q then
humanoid:LoadAnimation (anim) :Play()
print ("Animation is playing")
end
end
uis.InputBegan:Conect (onKeyPressed)
so this is the code i have, but whenever i play the game in roblox studio, and press "Q" is says:
Infinite yield possible on 'Workspace.bencharles429:WaitForChild("humanoid")'
how do i fix this?

3 comments
i did that code and now it says: "Conect is not a valid member of RBXScriptSignal"
Just Change Conect To Connect
thx dude