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
|
  |
| 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 |
|
|
|
| 11 Jun 2015 06:45 PM |
:findFirstChild("Pickaxe") ~= nil
@Time
Why a link at such a simple thing? |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|