|
| 10 Jun 2014 04:38 PM |
Why is this giving me errors? It gives me the error in output:
findfirstChild is not a valid member of Workspace
wtf? |
|
|
| Report Abuse |
|
|
|
| 10 Jun 2014 04:39 PM |
FindFirstChild
Not
findfirstChild |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Jun 2014 04:39 PM |
| It's not, you're doing something wrong |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Jun 2014 04:40 PM |
| findFirstChild also works, though it's deprecated |
|
|
| Report Abuse |
|
|
|
| 10 Jun 2014 04:40 PM |
| I'm doing FindFirstChild. I still get the error. |
|
|
| Report Abuse |
|
|
|
| 10 Jun 2014 04:41 PM |
here's the line of code:
checkexist = game.Workspace:FindFirstChild("" .. script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name .. "'s Pet") |
|
|
| Report Abuse |
|
|
|
| 10 Jun 2014 04:43 PM |
| Not sure if that's how it works.. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Jun 2014 04:44 PM |
Why do people do that... Make sure your amount of parents are correct, I'm pretty sure the script is not that deep in. |
|
|
| Report Abuse |
|
|
|
| 10 Jun 2014 04:44 PM |
| I've been doing it like that my whole life. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Jun 2014 04:45 PM |
No, why do people do this: "" .. whatever
When whatever is a string or number, Lua already handles it for you so it just makes you look dumb. |
|
|
| Report Abuse |
|
|
| |
|
|
| 10 Jun 2014 04:48 PM |
| He is talking about the unnecessary string concatenation with the "" .. "Other string" |
|
|
| Report Abuse |
|
|
|
| 10 Jun 2014 04:52 PM |
Don't know what you mean completely.
local dare="dsds"
print("hi"dare)--Error print("hi"..dare)--NoError
|
|
|
| Report Abuse |
|
|
|
| 10 Jun 2014 04:53 PM |
| Oops, sorry. It's fixed now. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 10 Jun 2014 05:02 PM |
| LM, that's not what I am talking about. |
|
|
| Report Abuse |
|
|