So im having this issue where, I have this morph I am making, and I wanted it to execute a function whenever I said something in chat, however, whenever I try it, it gives me a “MorphHead is not a valid member of Model.PeterCreates” when its actually there. I don’t know what to do anymore, I tried renaming it, using variables on it, etc. Here’s the line of code
and here’s the model :
and yes, whenever I morph into it, it goes to my character, here :
You could try using :WaitForChild("TheHead") instead of FindFirstChild, what might be happening is that this code runs before that instance is actually cloned over to your character.
I already fixed this and it still won’t work, since the previous issue was the fact “TheHead” was given as null, im assuming it’s waiting on forever and it’s not showing up
here’s a screenshot of how it currently looks
and as you’ve seen, “TheHead” is actually on the character, im not sure what is causing this but apparently the head thingy is being completely ignored.
Basically, you’re yielding for TheHead to exist, so your chatted event should theoretically never run since the script yields forever.
Perhaps if you removed your reference variable to ‘TheHead’, and used it only when you know it’ll exist, then maybe that’ll give you some success. However, you’ll probably still want to use WaitForChild since remotes do have a bit of a delay (ping)