HumanoidStateType changes to None after reset character

The question is why every time I reset the character, the humanoidStateType changes to None, I have completely no idea why this happen, I have read the post and asked ChatGPT already but I still don’t know why this happen. I have provide the things in StarterPlayer, I don’t know will this affect the HumanoidStateType.

(I disabled the CharacterLocalScript and use a new local script to print the humanoidStateType to ensure not the characterLocalScript, then that is why the output line is 10)

Thank you

2 Likes

try pressing ctrl + shift + f and type “none”, show me which scripts show up when doing that

1 Like


1 Like

hm, i dont see any scripts setting the humanoid state type to none.

1 Like

yah, thats why i have no idea. I dont know why the HumanoidStateType auto changed to None after reset character

what happens when you get the humanoid at the beginning of renderstepped newly everytime? and then print the state type

1 Like

As shown in the image, every time I press the play button, the humanoidStateType is Running. When I press reset character, the humanoidStateType is Dead. After respawn, is None

Read the documentation: HumanoidStateType | Documentation - Roblox Creator Hub

1 Like

I have read already, None is mean “Unusable placeholder in case an unknown state gets triggered internally.” but I think I didn’t set any unknow state

1 Like

Roblox sets it hence why it says “triggered internally”. Developers can’t set the Humanoid State Type to None.

1 Like

okay, but is there any reasons that will set it to None, it doesn’t write

Like you said after a character resets. What is the issue that you are having due to the state being None?

because this is a fighting game, so that some skill I check is the play have the state “Running” to check is the character standing. If the value is None, than I cannot check can the player use the skills

You mean to check if the player isn’t moving? I’m confused.

No, Running is mean the player is Standing or Walking

So why not just check if the player is alive

Did you updated the Humanoid variable after the character reset?
Humanoid:GetState() return HumanoidStateType.none when the Humanoid got destroyed and is nil, make sure to update the Humanoid at each respawn.

local Character = LocalPlayer.Character
local Humanoid = Character:WaitForChild("Humanoid")

local function UpdateCharacter()
    Character = LocalPlayer.Character
    Humanoid = Character:WaitForChild("Humanoid")
end

LocalPlayer.CharacterAdded:Connect(UpdateCharacter)
2 Likes

Because I dont want the player can use the skill when jumping or freefalling etc.

ommggggggg!!! Thank you so much, solved

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.