|
| 05 Aug 2017 01:59 PM |
repeat wait() until game.Players.LocalPlayer.Character
local Player = game.Players.LocalPlayer local Char = Player.Character local UIS = game:GetService('UserInputService') local FaceBlocks = workspace:WaitForChild('FaceBlocks')
UIS.InputBegan:connect(function(input) if input.Keycode == Enum.KeyCode.A then Char.Torso.CFrame = CFrame.new(Char.Torso.Position, FaceBlocks.FaceLeft.Position) end end)
It's not working and shows 'KeyCode is not a valid member of InputObject' Please, little help..? |
|
|
| Report Abuse |
|
|
|
| 05 Aug 2017 02:02 PM |
Check your "if input.Keycode == Enum.KeyCode.A then" line, it's case sensitive should be:
if input.KeyCode == Enum.KeyCode.A then
Notice the "Keycode" to "KeyCode" change |
|
|
| Report Abuse |
|
|
edenDeden
|
  |
| Joined: 29 Jul 2016 |
| Total Posts: 370 |
|
|
| 05 Aug 2017 02:04 PM |
https://www.youtube.com/watch?v=NWx5XQbpHBU&t=699s watch this u will understand that the first parameter isnt input
or read this http://wiki.roblox.com/index.php?title=API:Class/UserInputService
|
|
|
| Report Abuse |
|
|