Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --FNF Tuturial
- local UserInputService = game:GetService("UserInputService")
- UserInputService.InputBegan:Connect(function(input)
- local player = game.Players.LocalPlayer
- if input.UserInputType == Enum.UserInputType.Keyboard then
- if input.KeyCode == Enum.KeyCode.A then
- print("You Pressed A")
- player.Character.Humanoid:LoadAnimation(script.A):Play()
- end
- end
- if input.UserInputType == Enum.UserInputType.Keyboard then
- if input.KeyCode == Enum.KeyCode.D then
- print("You Pressed D")
- player.Character.Humanoid:LoadAnimation(script.D):Play()
- end
- end
- if input.UserInputType == Enum.UserInputType.Keyboard then
- if input.KeyCode == Enum.KeyCode.W then
- print("You Pressed W")
- player.Character.Humanoid:LoadAnimation(script.W):Play()
- end
- end
- if input.UserInputType == Enum.UserInputType.Keyboard then
- if input.KeyCode == Enum.KeyCode.S then
- print("You Pressed S")
- player.Character.Humanoid:LoadAnimation(script.S):Play()
- end
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement