I deleted the character on purpose with a destroy script in starter character scripts. How do I prevent this warning from occurring?
![]()
I deleted the character on purpose with a destroy script in starter character scripts. How do I prevent this warning from occurring?
![]()
First check to see if the player has the Humanoid / character, perhaps with :FindFirstChild or something of the sort, if not then don’t call :Move.
I believe the :Move call is from a default script, but I can’t locate it.
Honestly I do not know how I would find the core script calling that then, unless clicking that warning will lead you to the source.
The control scripts expect there to always be a character and humanoid as they’re at a level higher than the character itself, running from PlayerScripts. It’s annoying they throw this warning, and possibly unnecessary. This should probably be changed someday.
Are you sure you need to delete the character? Can you try removing body parts and scripts from the character instead if just visually removing them is your intention?
I know this post is nearly half a decade old but it was the first result when I pressed search, and given the number of views, I assume people are still coming across it. I don’t think there was an actual solution given.
I’m assuming you’re making (well, made because of the age of this post) a custom/manually controlled character respawn system, as was I which is how I found this post in the first place.
It turns out it’s because while the character is being destroyed, it’s still being referenced by the Character property thus it never actually gets set to nil; it’s still referencing a model with no children, thus causing this warning. You can verify this yourself by looking at your player’s Character property or by printing player.Character after destroying it, the property is not nil.

The solution I found for this was by setting player.Character to nil and only after setting it to nil, destroy the character.
-- no warning
task.delay(3, function()
player.Character = nil
character:Destroy()
end)
-- this /will/ cause a warning as player.Character will still be a model:
task.delay(3, function()
character:Destroy()
end)
While I do agree that it’s not a particularly useful warning and that it’s super annoying, there could be a technical reason the player:Move call isn’t omitted but whatever
its in the warning/error, the player does not have any humanoid, so it can’t move, try to check into your character and check if it has a humanoid in explorer, if not, then some script is probably destroying it.
I just tried settings Player’s Character value to nil and THEN destroying the character. It works well.
This works wonders! Just came across this problem, while making a spectate system.
me personally i prefer to do something like the solution said
adventages of this you dont have to save player.Character in local variable ![]()
player.Character:Destroy()
player.Character=nil
and this also works:
local char=player.Character
player.Character=nil
char:Destroy()
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.