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: Automatic Tool Selection

Previous Thread :: Next Thread 
MrHistory is not online. MrHistory
Joined: 30 Aug 2010
Total Posts: 5291
21 Aug 2011 05:41 PM
I want to make a tool that is automatically selected when the player joins my game. After it is selected, it is removed from the player's backpack so it can't be deselected. Kinda like what nds did with his Counter Strike game. Anyways, here's what I came up with:

Hierarchy:
[]StarterPack
[][]Tool
[][][]LocalScript

Tool = script.Parent
Player = game.Players.LocalPlayer
Mouse = nil

--AutoSelect
repeat wait() until Player.Character

Tool.Equipped:connect(function(m)
print("Equipped")
Mouse = m
Tool:remove()
end)

Tool.Parent = Player.Character


The tool appears to be selected, but the Equipped event doesn't fire. Halp?

Report Abuse
eXoguti093 is not online. eXoguti093
Joined: 17 Oct 2008
Total Posts: 1786
21 Aug 2011 06:28 PM
http://www.roblox.com/Forum/ShowPost.aspx?PostID=53356767
Report Abuse
MrHistory is not online. MrHistory
Joined: 30 Aug 2010
Total Posts: 5291
21 Aug 2011 06:31 PM
I want the tool, not just the mouse
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
21 Aug 2011 06:45 PM
Do you have any bricks in the tool?

That's how I fixed mine....
Report Abuse
ZackZak is not online. ZackZak
Joined: 26 Jul 2009
Total Posts: 2811
21 Aug 2011 06:49 PM
It needs a part called Handle.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
21 Aug 2011 06:50 PM
^
Report Abuse
MrHistory is not online. MrHistory
Joined: 30 Aug 2010
Total Posts: 5291
21 Aug 2011 08:47 PM
Ok, thankx!
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