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
 

Re: How do I...

Previous Thread :: Next Thread 
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 01:35 PM
How do I make a script where you click a key like "C" on your keyboard without a tool and something happens?
Report Abuse
POC0bob is not online. POC0bob
Joined: 20 Feb 2010
Total Posts: 549
28 Aug 2013 01:38 PM
You use magic.

or this...
(in a local script)

local mouse = game.Players.LocalPlayer:GetMouse()
mouse.KeyDown:connect(function(key)
--print(key:byte() .. " pressed")
if key:byte() == 48 then

end
end)
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
28 Aug 2013 01:40 PM
mouse = game.Players.LocalPlayer:GetMouse() -- In a local script, please.
mouse.KeyDown:connect(
function(key) if key = "c" then
-- Whatever



end
end)
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 01:40 PM
How do I make it a certain key?
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
28 Aug 2013 01:41 PM
key == "c"


Sorry 'bout dat.
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 01:41 PM
Oh, I posted that before I saw what you said.
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 01:43 PM
I should say what I need more...

I only want you to be able to do it if you're sitting in a seat. Sorry I forgot to say if. .-.
Report Abuse
Bebee2 is not online. Bebee2
Joined: 17 May 2009
Total Posts: 3985
28 Aug 2013 01:45 PM
mouse = game.Players.LocalPlayer:GetMouse() -- In a local script, please.
mouse.KeyDown:connect(
function(key)
if key = "c" then
if game.Players.LocalPlayer.Humanoid.Sit == true then

-- Whatever



end
end
end)


-- Is it really that hard to imagine .-.?
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 01:46 PM
I'm just a basic scripter. .-.
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 01:48 PM
Erm, if it's in a local script, is it:

localscript.Parent

Or:

script.Parent

Erm. .-.
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 01:57 PM
.-.
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 01:58 PM
local Gear = script.Parent.Parent.Character.PlayerGui.Options.SpeedAmount.GearNum
mouse = game.Players.LocalPlayer:GetMouse() -- In a local script, please.
mouse.KeyDown:connect(
function(key)
if key == "x" then
if game.Players.LocalPlayer.Humanoid.Sit == true then
if Gear.Value >= 0 and Gear.Value <= 3 then
Gear.Value = Gear.Value +1
end
end
end
end)
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 01:59 PM
Will that work?
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 02:10 PM
Help please?
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 02:31 PM
.-.?
Report Abuse
kjell100 is not online. kjell100
Joined: 24 May 2010
Total Posts: 295
28 Aug 2013 02:45 PM
Go check roblox wiki.



You can earn In-Game badges in my game The ShadowMaster! Go to my profile and play The ShadowMaster to see In-Game badges! There is also a ranking system! This game deserves Front Page!
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 03:00 PM
Thanks that helped a lot. NOT. -.-
Report Abuse
kjell100 is not online. kjell100
Joined: 24 May 2010
Total Posts: 295
28 Aug 2013 03:01 PM
Well it doesn't help for dumb people.




You can earn In-Game badges in my game The ShadowMaster! Go to my profile and play The ShadowMaster to see In-Game badges! There is also a ranking system! This game deserves Front Page!
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 03:05 PM
I'm not dumb. -_-
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 07:00 PM
How do I get a script where you click a key on your keyboard and the value of something in the player's GUI changes?
Report Abuse
pikaard is not online. pikaard
Joined: 14 Nov 2012
Total Posts: 757
28 Aug 2013 07:25 PM
Someone help... Please. .-.
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