You need to move the Torso, but not the humanoidrootpart. But it shouldn’t matter: humanoid has a property called ‘HipHeight’. You could adjust it when crouching, to be lower.
Hello again. This doesn’t seem to work for me, sadly.
I’ve made sure the following:
The animation is the group of which holds the game.
Animation type: Action (ive also tried movement)
I cant seem to figure out why. I am gonna try to open an empty baseplate and recreate this script to see if that works.
Is it printing ‘true/false’ when you press c?
Let me check right now.
asdjnasdhjiasd
It does not print true or false in the output when I click C
Is your script a localscript? And where is it stored?
Put the script (local script) in startercharacterscripts
Tried deleting everything except for the InputBegan command and just did print when C is clicked, nothing else and that still doesnt work??
Yes its a localscript and its stored inside the StarterCharacterScripts.
What does the output say? And did you copy my script?
I copied your script 100%. And the output has no mentions of the script whatsoever. No errors, no prints, nothing.
Yo!
I have tried rewriting some of the code and for unknown reasons its decided to suddenly actually detec when I click “C”.
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.C then
print("test!")
end
end)
I have not tried to implement the animation yet. But will do so right now!
Are you sure it was in a localscript before?
100%.
ahsdbasudbasudvasudvbasd
Mind sending me the studio file? It should work fine
Because I want to see why it isn’t working. No, not the code, send me the RBLX file of the original place where it wouldn’t work
Uh cant do that. That’d be my entire game for my military group. Sorry.
Np, just curious as to what went wrong.
It’s alright. My guess is probably some minor code that we missed or maybe a setting in the game settings that I havent ticked?
I don’t know why it wouldnt work the first time, I still haven’t added the animation part of the script, can you add it? Im kinda not sure what to do.
animation ID: ‘rbxassetid://16232004956’
And here is what I have so far:
local UIS = game:GetService("UserInputService")
local animID = 'rbxassetid://16232004956'
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.C then
print("test!")
end
end)
I figured out why it didn’t work
local animID = 'rbxassetid://16066342156'
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local Humanoid = player.CharacterAdded:Wait():FindFirstChild("Humanoid")
local activated = false
local UIS = game:GetService("UserInputService")
local animation = Instance.new("Animation")
animation.AnimationId = animID
local AnimationTrack = Humanoid:LoadAnimation(animation)
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.C then
activated = not activated
print(activated)
if activated then AnimationTrack:Play() else AnimationTrack:Stop() end
end
end)
Try this