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 » Scripting Helpers
Home Search
 

[ Content Deleted ]

Previous Thread :: Next Thread 
TheDarkMelon is not online. TheDarkMelon
Joined: 26 Jan 2013
Total Posts: 17713
18 Oct 2013 05:25 PM
[ Content Deleted ]
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
18 Oct 2013 05:28 PM
Because you put the l part INSIDE the if statement for the k part. Which means the l statement will never be reached unless you press k, in which case you are not pressing l in the event. Use elseif(key=='l') and remove one of the ends to fix it up.
Report Abuse
TheDarkMelon is not online. TheDarkMelon
Joined: 26 Jan 2013
Total Posts: 17713
18 Oct 2013 05:38 PM
[ Content Deleted ]
Report Abuse
spikey490 is not online. spikey490
Joined: 06 Oct 2008
Total Posts: 229
18 Oct 2013 05:40 PM
local Player=game.Players.LocalPlayer
local mouse=Player:GetMouse()
local function rtKeyDown(key)
print('Key down event: ',key,string.byte(key))
if(key=='k')then
Player.CameraMode='LockFirstPerson'
print('Key down event:',key,string.byte(key))
elseif(key=='l')then
Player.CameraMode='Classic'
end
end

mouse.KeyDown:connect(rtKeyDown)
Report Abuse
AgentFirefox is not online. AgentFirefox
Top 100 Poster
Joined: 20 Jun 2008
Total Posts: 22404
18 Oct 2013 05:41 PM
I just told you how to fix the script. :/

Use elseif(key=='l') and delete one of the ends.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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