hoemando
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 110 |
|
|
| 12 Jun 2017 09:18 AM |
Some reason I get this error on my tool.
Output:
07:03:30.091 - Players.Player1.Backpack.Case.Script:3: attempt to index field 'Parent' (a nil value) 07:03:30.093 - Stack Begin 07:03:30.094 - Script 'Players.Player1.Backpack.Case.Script', Line 3 07:03:30.096 - Stack End
Explorer:
>StarterPack >Case >Script >WeldScript >Welding >new >LocalScript >Owner >WeldScript >Welding >Hand1 >Hand2 >Hand3 >Handle >Logo >Wheel1 >Wheel2 >GUI
Script:
while true do wait(1) script.Parent.Wheel1.Anchored = false script.Parent.Wheel2.Anchored = false script.Parent.Hand1.Anchored = false script.Parent.Hand2.Anchored = false script.Parent.Hand3.Anchored = false script:Destroy() end
|
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 09:48 AM |
Do you do this just to mess with us?
|
|
|
| Report Abuse |
|
|
hoemando
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 110 |
|
|
| 12 Jun 2017 09:50 AM |
| Nope. I actually need help. |
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 09:59 AM |
Don't delete the script, why would you do that? It invalidates the while loop, making it useless.
|
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 10:04 AM |
Though if you really want to delete the script object, I would assume caching the parent would be sufficient. Put this outside of the while loop:
local parent = script.Parent
Then refer to parent instead of script.Parent.
Why would you want to delete the script though? Seems a bit pointless. |
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 10:12 AM |
local--[[]]v=script;script={Parent=script.Parent}wait(1)v:Destroy() while true do script.Parent.Wheel1.Anchored = false script.Parent.Wheel2.Anchored = false script.Parent.Hand1.Anchored = false script.Parent.Hand2.Anchored = false script.Parent.Hand3.Anchored = false wait(1) end
|
|
|
| Report Abuse |
|
|
hoemando
|
  |
| Joined: 07 Sep 2013 |
| Total Posts: 110 |
|
|
| 12 Jun 2017 10:44 AM |
| Sorry for the late post. Yeah, I did see the while loop was pointless. I defined parent = script.Parent and it worked. Thanks! |
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 01:23 PM |
| i dont get what u are trying to say... |
|
|
| Report Abuse |
|
|