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: Auto equip an item on spawn

Previous Thread :: Next Thread 
Skreench is not online. Skreench
Joined: 29 May 2009
Total Posts: 1050
08 Oct 2015 01:35 PM
So I have a game that requires a marble tool, but currently you have to click to enable it. How do I make it become equipped on spawn?
Report Abuse
Deafgift100 is not online. Deafgift100
Joined: 09 May 2010
Total Posts: 3958
08 Oct 2015 01:37 PM
Try inserting it into the character model. I've heard that's supposed to work.
Report Abuse
Skreench is not online. Skreench
Joined: 29 May 2009
Total Posts: 1050
08 Oct 2015 02:10 PM
How exactly would I do that?
Report Abuse
Garfanzo is online. Garfanzo
Joined: 24 Apr 2015
Total Posts: 742
08 Oct 2015 02:13 PM
I use this function in my tools, it is a beauty.

game.Players.LocalPlayer.Character:findFirstChild("Humanoid"):EquipTool(script.Parent)
Report Abuse
LotsOfViolence is not online. LotsOfViolence
Joined: 29 Jun 2011
Total Posts: 8375
08 Oct 2015 02:21 PM
Garfanzo is correct,however I tested it and it did not work. So I added this to the top:

repeat wait() until game.Players.LocalPlayer.Character


so do this:

repeat wait() until game.Players.LocalPlayer.Character
game.Players.LocalPlayer.Character:findFirstChild("Humanoid"):EquipTool(script.Parent)


And it works 100%

http://www.roblox.com/Coon-left-item?id=296811217 http://www.roblox.com/Coon-right-item?id=296811237
Report Abuse
Garfanzo is online. Garfanzo
Joined: 24 Apr 2015
Total Posts: 742
08 Oct 2015 02:25 PM
repeat wait()

I haven't seen that one before, is it kind of like a WaitForChild() ?
Report Abuse
Crimsonal is not online. Crimsonal
Joined: 23 Apr 2011
Total Posts: 1795
08 Oct 2015 02:32 PM
Yeah but waitforchild doesn't work for me XD
Report Abuse
Skreench is not online. Skreench
Joined: 29 May 2009
Total Posts: 1050
08 Oct 2015 02:33 PM
Thanks guys I'll try it out later
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