This is something I have no clue to solve. My script is waiting for a part called “Exhaust” as it is required for it to work. This only recently begun happening, it used to work just fine, yet I have not changed the script or model. Any ideas?
I’m not entirely sure how waitforchild works, but if you call Handle:WaitForChild(“Exhaust”) is it possible that it isn’t finding the Handle right away, so that’s why it’s giving the error?
I could be completely off though…
I’m pretty sure if you try to call a function on a nil value, it will error straight away.
Maybe it has something to do with client-server disparity?
Is the Exhaust
part on the server/whatever this script is?
Is it possible that you have more than one part named “Handle” that’s parented to ODMG?
Is Exhaust spelled right and is there more than one instance named Exhaust?
Use CharacterAppearanceLoaded instead of CharacterAdded, and maybe replace :WaitForChild() with :FindFirstChild(), then try both.
Sorry for the late reply! Yep. It is, also there is no more instances called “Exhaust”.
Nope.
I got super paranoid that this was the error, so I even added two wait for childs which I’m not even sure makes a difference, yet it didn’t fix anything.
Does it load in a regular Roblox game (not in studio)?
Could try :WaitForChild(“object”,5) – search for 5 seconds before stopping? Wait For Child is weird that’s why I just prefer doing waiting checks for game:IsLoaded and player.Character, by that time your part should be there and thus removing the need for : WaitForChild
Nope. I’m thinking of just adding a second long wait (my last resort) instead of using :WaitForChild(). This’ll probably work.
Denis’ suggestions is exactly what you want to do there.
:WaitForChild() takes in 2 parameters: the string of the object name, and the length of the timeout.
Tried using :wait(), it worked perfectly fine.
I replaced it with WaitForChild(“Exhaust”, 5) and well it did fix the infinite yield issue yet it led to an error about trying to index nil with it.
@returnedbydeath
have you checked if the said part has Archivable ticked?
is that screen shot from when you are in game?