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: Keybinding.

Previous Thread :: Next Thread 
DIVE_5 is not online. DIVE_5
Joined: 12 Jul 2011
Total Posts: 422
15 Oct 2016 11:59 PM
So I hidden the backpack toolbar, but I want to equip weapons by pressing the key "1"

game.Players.LocalPlayer:GetMouse().KeyDown:connect(function(key)
if string.lower(key) == "1" then
-what?-

end
end
Report Abuse
DIVE_5 is not online. DIVE_5
Joined: 12 Jul 2011
Total Posts: 422
16 Oct 2016 12:02 AM
When I hidden the toolbar, It did not let me equip tools by merely pressing the key "1"
Report Abuse
Pheserus is not online. Pheserus
Joined: 07 Aug 2016
Total Posts: 69
16 Oct 2016 12:06 AM
Well I'm no expert, but I imagine that you would move the weapon from the player backpack into the player in world space.
Report Abuse
Stereotypical_Nerd is not online. Stereotypical_Nerd
Joined: 08 Feb 2012
Total Posts: 2088
16 Oct 2016 12:47 AM
remove backpack (somehow)

store the tools somewhere

when they press 1 parent the tool to the player

when they press something else, parent the tool to where it once game from


game.Players:findFirstChild("Stereotypical_Nerd"):WaitForChild("leaderstats")['Whiteness and Nerdiness'].Value=math.huge
Report Abuse
Pheserus is not online. Pheserus
Joined: 07 Aug 2016
Total Posts: 69
16 Oct 2016 01:04 AM
I just tested it and it worked for me. The tool was fully functional.

[Equip]
game.Players.LocalPlayer.Backpack.Tool.Parent = game.Players.LocalPlayer.Character

[Un-Equip]
game.Players.LocalPlayer.Character.Tool.Parent = game.Players.LocalPlayer.Backpack
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