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: How do I make a script check something?

Previous Thread :: Next Thread 
mezk is not online. mezk
Joined: 21 May 2009
Total Posts: 102
11 Jun 2015 06:42 PM
I'm trying to make this script check to see if a player has a tool equipped when stood on a certain brick.
I've probably started it completely wrong but honestly I don't know what I'm doing anyway:

part = game.Workspace.minesquare

function onTouched(part)
if

which is where I want it to check if the player stood on the brick has the tool equipped
(the tool is called "Pickaxe")
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
11 Jun 2015 06:44 PM
http://wiki.roblox.com/index.php?title=Absolute_beginner%27s_guide_to_scripting
Report Abuse
TehGabeNewell is not online. TehGabeNewell
Joined: 07 Feb 2013
Total Posts: 3165
11 Jun 2015 06:45 PM
:findFirstChild("Pickaxe") ~= nil

@Time

Why a link at such a simple thing?
Report Abuse
mezk is not online. mezk
Joined: 21 May 2009
Total Posts: 102
11 Jun 2015 06:50 PM
@teh
Won't that check if the player doesn't have it equipped?
Maybe I should of explained more, if they do have it equipped when they touch the brick I want it to play an animation, if not do nothing
Report Abuse
TehGabeNewell is not online. TehGabeNewell
Joined: 07 Feb 2013
Total Posts: 3165
11 Jun 2015 06:54 PM
Actually, check for the Handle, not the tool itself.

@mez

Don't they have to equip it anyways in order to make the brick check for it?
Report Abuse
mezk is not online. mezk
Joined: 21 May 2009
Total Posts: 102
11 Jun 2015 06:56 PM
It could be done that way too, but either way making it check if the tool is unequipped won't do anything?
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