#keybinding a blocking animation
1 messages · Page 1 of 1 (latest)
what is your console output? Is the key press being registered, and it's just the animation not playing?
it says
22:09:03.531 Animation is not a valid member of LocalScript "Workspace.greatWuFsWOLFIE.LocalScript" - Client - LocalScript:12
22:09:03.531 Stack Begin - Studio
22:09:03.531 Script 'Workspace.greatWuFsWOLFIE.LocalScript', Line 12 - Studio - LocalScript:12
22:09:03.531 Stack End - Studio
22:09:13.715 :: Adonis :: Loading version 266 Complete; Required by Loader version: 266 - Server
Where is Ur animations located in?
the starter player scripts
Ik what to do
tell me my gng plis!!
local UIS = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Debounce = false
local Cooldown = 1.5
UIS.InputBegan:Connect(function(input, isTyping)
if isTyping then
return
elseif input.KeyCode == Enum.KeyCode.E and not Debounce then
Debounce = true
local Humanoid = Character:WaitForChild("Humanoid")
local Animation = script.Animation
if Animation and Humanoid then
local PlayAnim = Humanoid:LoadAnimation(Animation)
PlayAnim:Play()
else
warn("Animation or Humanoid not found")
end
wait(Cooldown)
Debounce = false
end
end)
lemme see
it says animation is not a valid member of local script 😭
Do you have it as a child
?
it should be
local UIS = game:GetService("UserInputService")
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Debounce = false
local Cooldown = 1.5
UIS.InputBegan:Connect(function(input, isTyping)
if isTyping then
return
elseif input.KeyCode == Enum.KeyCode.E and not Debounce then
Debounce = true
local Humanoid = Character:WaitForChild("Humanoid")
local AnimationId = "rbxassetid://Animation Id"
local Animation = Instance.new("Animation")
Animation.AnimationId = AnimationId
if Humanoid then
local PlayAnim = Humanoid:LoadAnimation(Animation)
PlayAnim:Play()
else
warn("Humanoid not found")
end
wait(Cooldown)
Debounce = false
end
end)
Here try this and replace the animation id with the actual one
there
im trying rn
INVALID ANIMATION IF
1 sec
22:29:11.704 Invalid animation id '<error: unknown AssetId protocol>': - Client - LocalScript:20
22:29:11.704 Stack Begin - Studio
22:29:11.704 Script 'Workspace.greatWuFsWOLFIE.LocalScript', Line 20 - Studio - LocalScript:20
22:29:11.704 Stack End - Studio
22:29:21.352 :: Adonis :: Loading version 266 Complete; Required by Loader version: 266 - Server
** You are now Level 2! **
😭
Try if is typing then return end
is that just the animation bein funky?
where 😭
Local animation = script:waitforchild("animation")
Ya if istyping then return end
And then add another if statement if input.keycode blah blah blah
Use task.wait instead of wait
do i replace "animation" with the id or naw?
that in there
Ya but U didn say end
U say end at the bottom
Say it in the top
under return
where 😭
Did U write this code urself or what ☠️
It's not humanoid load animation
It's suppose to be animator
i used his bruh
Ow ok then
yuh
then what do i replace it wit gng?
other dude was using chatgpt 🙏
youre supposed to get the animator which is a child of the humanoid