|
| 21 Sep 2016 08:50 AM |
local tool = script.Parent.Parent:GetChildren()
if tool.Equipped:connect() then return end
That will work ? |
|
|
| Report Abuse |
|
|
iIikeyou
|
  |
| Joined: 07 Mar 2012 |
| Total Posts: 1659 |
|
|
| 21 Sep 2016 08:55 AM |
| script.Parent.Equipped:connect(error) |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2016 08:58 AM |
| Players.Player1.Backpack.Shoot:4: attempt to index field 'Equipped' (a nil value) |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 21 Sep 2016 08:59 AM |
Uh, why do you want to break a script if the tool is equipped?
|
|
|
| Report Abuse |
|
|
|
| 21 Sep 2016 09:00 AM |
if game.Players:findFirstChild(script.Parent.Parent.Parent.Name) then --equipped else --nope end |
|
|
| Report Abuse |
|
|
vexieh
|
  |
| Joined: 22 Oct 2009 |
| Total Posts: 3468 |
|
|
| 21 Sep 2016 09:00 AM |
You should go back to the basics of scripting
|
|
|
| Report Abuse |
|
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 21 Sep 2016 09:11 AM |
local equipped = false
if equipped then return end
tool.Equipped:connect(function() equipped = true end)
tool.Unequipped:connect(function() equipped = false end)
|
|
|
| Report Abuse |
|
|
|
| 21 Sep 2016 09:19 AM |
| Players.Player1.Backpack.Shoot:9: attempt to index global 'tool' (a nil value) |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 21 Sep 2016 09:22 AM |
smh im tired of these idiots
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 21 Sep 2016 09:23 AM |
| ######################################################### |
|
|
| Report Abuse |
|
|
vexieh
|
  |
| Joined: 22 Oct 2009 |
| Total Posts: 3468 |
|
|
| 21 Sep 2016 09:23 AM |
@dadibox1234 Because by the looks of it you barely even understand the basics.
|
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 21 Sep 2016 09:23 AM |
http://wiki.roblox.com/index.php?title=Intro_to_Scripting
|
|
|
| Report Abuse |
|
|
|
| 21 Sep 2016 09:25 AM |
local tool = game.Players.Localplayer.Backpack:GetChildren()
That will work ? |
|
|
| Report Abuse |
|
|
vexieh
|
  |
| Joined: 22 Oct 2009 |
| Total Posts: 3468 |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 21 Sep 2016 09:26 AM |
local player = game.Players.Localplayer local tool = player.Backpack['SOMETOOL']
|
|
|
| Report Abuse |
|
|
|
| 21 Sep 2016 09:27 AM |
| But i want to choose all tool ... :/ |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 21 Sep 2016 09:29 AM |
http://wiki.roblox.com/?title=Loops
|
|
|
| Report Abuse |
|
|
vexieh
|
  |
| Joined: 22 Oct 2009 |
| Total Posts: 3468 |
|
|
| 21 Sep 2016 09:29 AM |
Definitely go back to the basics, you don't even know what you're doing.
|
|
|
| Report Abuse |
|
|
vexieh
|
  |
| Joined: 22 Oct 2009 |
| Total Posts: 3468 |
|
|
| 21 Sep 2016 09:31 AM |
http://wiki.roblox.com/index.php?title=Table#Iterating_over_arrays
|
|
|
| Report Abuse |
|
|