Okay, as you can see I have a script that teleports mobs to the starting point, but why, then teleported only the body, and the head remains in place, what is the problem?
Replace line 25 with this:
newMob:SetPrimaryPartCFrame(map.Path.Start.CFrame)
But make sure that you have made the HumanoudRootPart the primary part of the model.
How do you check if itβs the main part?
Press on model and see in properties.
Because I have bad habits of coding, I usually change the CFrame of the HRP without having any issue like NPC losing their head, how changing the primaryPart cframe would fix that issue?
Maybe the head is being affected by other scripts?
Click the model, and theres a property called PrimaryPart, make sure the HRP is the primary part of the model
So, I looked, and my main part is HumanoidRootPart, also I replaced the line and the monsters stopped appearing at all. So I put it back the way it was, maybe the problem is not in the code?
Can you show me output? Maybe there is an error.
I suggest, for testing and debugging, create a new model, place a part called HumanoidRootPart, and use weldContraints to attach idk 3 parts, and run your code normally, changing the CFrame of that new model HRP, if all parts moves correctly (as it shouldβ¦) then the issue is in your NPC rig, maybe the head is not attached correctly by the motor6d or the head is influenced by other scripts
Try to put the line 25 to line 27.
The head is definitely not influenced by other scripts, because these are all scripts that I have in the game, but about motor6d, I just tested what you said and it seems that yes, probably still attached the head is somehow wrong. Hereβs a screenshot of how I have it attached
nothing has changed) the mob still appears without a head
Maybe Im asking for too much, but maybe you could send the NPC as a file in here, and I can give it a check
Would you mind to check if the head exists for the mob when it gets spawned in? And if so can you check if the head was anchored or not?
With script that i made???
How do you do that? Iβve just never done this before.
Right click the model and βSafe to fileβ then place that file in your message. Its ok if you dont want to
icic, can you check if the property of the head is anchored?
Another quick debugging test you could do, is using a Rig from roblox studio, create a new rig, and change the HRP cframe of that one, Im sure the new rig should work, meaning the issue is in your NPC