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 » Game Design
Home Search
 

Re: Help with lua

Previous Thread :: Next Thread 
strangemansgar356 is not online. strangemansgar356
Joined: 13 Mar 2013
Total Posts: 5
29 Oct 2017 09:54 PM
So, i have an item in my backpack that i would like to select. But, the catch is, i want to select it through a script. Any ideas how to do it? Thanks :D

\\ not sure if this would be considered a attempt but

if game.Players.strangemansgar356.Backpack.RocketLauncher
then
wait(0.1)
end
Report Abuse
strangemansgar356 is not online. strangemansgar356
Joined: 13 Mar 2013
Total Posts: 5
29 Oct 2017 10:02 PM
More or less, i want to be able to select a certain item in my backpack to where i can use it in game through a script
Report Abuse
Scottifly is online. Scottifly
Joined: 30 Jan 2011
Total Posts: 9180
29 Oct 2017 10:05 PM
Are you trying to force equip an item, or have it trigger when you touch something?

Just trying to get some context as to what you want to do to cause the backpack item to equip with the script.
Report Abuse
SummerEquinox is online. SummerEquinox
Joined: 25 Jun 2013
Total Posts: 2088
29 Oct 2017 10:06 PM
.Humanoid:EquipTool(pathway)


Programmer, DevForum Member, RDC Attendee, Roblox QA Tester, and Roblox Beta Tester.
Report Abuse
strangemansgar356 is not online. strangemansgar356
Joined: 13 Mar 2013
Total Posts: 5
30 Oct 2017 08:20 PM
Force equip.
Report Abuse
royaltoe is not online. royaltoe
Joined: 14 Sep 2011
Total Posts: 36834
30 Oct 2017 08:49 PM
the if statement would go like so:

if ________ then
game.Workspace.Player1.Humanoid:EquipTool(Workspace.Tool)
end


____ is what you want to do that triggers the player to select the tool

Report Abuse
royaltoe is not online. royaltoe
Joined: 14 Sep 2011
Total Posts: 36834
30 Oct 2017 08:51 PM
"workspace.tool" is also interchangeable. it can equip any tool anywhere.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Game Design
   
 
   
  • 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