|
| 14 Aug 2015 06:57 PM |
WaitForChild does not listen to name changes of existing children. For example, if a script calls Workspace:WaitForChild("Brick") and a part in Workspace is renamed from Part to Brick, the method will continue waiting.
Another example, the code waits for an instance in the Workspace named "Block". If the instance is not in the Workspace, this code will just keep waiting.
local part = Workspace:WaitForChild("Block") print(part.Name .. " has been added to the Workspace")
So if you think something is wrong with the script, you don't see errors in the output, and you're using WaitForChild, you might want to check on that variable or whatever you're using WaitForChild on.
Hope this has been helpful! |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2015 07:00 PM |
'WaitForChild does not listen to name changes of existing children' I thought this was changed? |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2015 07:03 PM |
So cnt is back... kk
Women are like fine wine, I can't get their tops off |
|
|
| Report Abuse |
|
|
|
| 14 Aug 2015 07:04 PM |
why is dev in ur name.
obvs a dud |
|
|
| Report Abuse |
|
|
| |
|
|
| 14 Aug 2015 07:50 PM |
"WaitForChild does not listen to name changes of existing children. "
Yes it does.
Well as of last week |
|
|
| Report Abuse |
|
|
cycoboy83
|
  |
| Joined: 31 May 2011 |
| Total Posts: 831 |
|
|
| 14 Aug 2015 08:05 PM |
Decided to test this in the name of science! Using 2 scripts in ROBLOX Studio:
Script 1: wait(2) print("Spawning part") local part = Instance.new("Part",Workspace) print("Renaming part") part.Name = "Bleh"
Script 2: print("Beginning wait") Workspace:WaitForChild("Bleh") print("We gotz a bleh!")
Output: Beginning wait Spawning part Renaming part We gotz a bleh!
So the people who have posted before me are correct. WaitForChild will listen for name changes and react accordingly. |
|
|
| Report Abuse |
|
|