generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Little help in simple script

Previous Thread :: Next Thread 
raspyslenderman1234 is not online. raspyslenderman1234
Joined: 09 Aug 2014
Total Posts: 153
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
juniorjfive is not online. juniorjfive
Joined: 05 Jan 2010
Total Posts: 671
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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image