What I'm trying to do is make it to where if I press "E" Or "Q" then my character leans. I already know the UserInputService stuff, I just need to know how I could make my character's head lean.
You can make it so when you press "E" or "Q" it plays an animation. This is on a local script, and I would put it in StarterPack
01 | local UIS = game:GetService( "UserInputService" ) |
02 | local debounce = false |
03 | local cooldown = (add how long your cooldown would be ex: 5 ) |
04 | local Character = Player.CharacterAdded:Wait() |
05 | local humanoid = Character:WaitForChild( "Humanoid" ) |
06 | local animation = workspace.Animation --put your animation in the workspace, make sure its named Animation |
07 | animation.AnimationId = "http://www.roblox.com/asset/?id=insertAnimationIdHere" |
08 | local animationTrack = humanoid:LoadAnimation(animation) |
09 |
10 |
11 | UIS.InputBegan:Connect( function (input,isTyping) |
12 | if isTyping then |
13 | return |
14 | elseif input.KeyCode = = Enum.KeyCode.Q then |
15 | if debounce = = false then |