Can Someone Tell Me How To Make Key To Load Animation?
A bit of UIS and extra script to resolve your problem.
01 | local UIS = game:GetService( "UserInputService" ) |
02 | local Player = game.Players.LocalPlayer |
03 | local Character = Player.Character |
04 | local Anim = Instance.new( "Animation" ) |
05 | local debounce = false |
06 | Anim.AnimationId = "rbxassetid://4751394808" --Put your animation here |
07 | local PlayAnim = Character.Humanoid:LoadAnimation(Anim) |
08 | wait( 0.3 ) |
09 | UIS.InputBegan:Connect( function (input,IsTyping) |
10 | if IsTyping then return end |
11 | if input.KeyCode = = Enum.KeyCode.T then --Pick a key letter you want |
12 | if not debounce then |
13 | debounce = true |
14 | print ( "Animation starting." ) |
15 | wait( 0.5 ) --Putting a small wait in between doing the function again |
16 | debounce = false |
17 | end |
18 | end |
19 | end ) |