I’m insanely confused. For a while, my game has been giving me small issues from certain features not working because my Humanoid was dead, when the player was clearly alive, and now today, my gun script is ceasing to work completely, and I noticed it only happens when my script prints Enum.HumanoidStateType.None.
What even is this, and what can I do to fix it?
I know it’s nothing wrong with my gun scripts because I’ve had them reviewed probably over 10+ times now. I can’t seem to find any issues with them. It only breaks my scripts sometimes when I spawn in. It’s a random chance that the engine decides it’ll work or not.
I noticed that it only breaks scripts that use if statements that rely on Humanoid State types.
Gun works normally when this is printed:
Gun does not work properly when this is printed:
Is there any methods in a script that I can use to possibly fix this? Is this a common HumanoidStateType error? The Roblox documentation page says it’s an unusable placeholder, but I have no clue what that even means.
Placeholder: Something taking the Place of something ( or Google Definition ) (Ex: There is an Update Coming out. there is a Placeholder Detail to Mark for that occasion temporarily until it comes out)
Unusable: Cannot be Used
I don’t think it means that it wont appear, it just means that you cant use it, and the triggered internally part just means it can only be used by CoreScripts and other stuff related to that, Since it appears to be triggered by an unknown State, that might be why you are getting this.
I Cannot find any relevant Links for HumanoidStateType.None, The Only real thing related is that “apparently” it is just when the Humanoid isn’t doing anything, I doubt this and I’ll continue to look into it.
How is the Humanoid not doing anything? When it does work, R6 rigs (which my game uses), defaults to the Running state, even if Idle, and doing absolutely nothing.
I really hope someone submits a bug report on this, because I just disabled a few core features in my game, and it still occurs.
I don’t think Its a bug, with the only info I can find, its just: Placeholder State in case of an Unknown State, Shouldn’t be anything wrong, Just Internal Scripts interpreting a state as unknown
Okay, well I appreciate the insight. The situation is frustrating, and I don’t mean to be too harsh on you. I know you won’t have all the answers, I just hope I find one soon.
I commend your search, and I really hope your investigations can surface some sort of resolution, even if it’s a workaround.
My friend suggested I do a few things, like checking to see if humanoid states are all enabled and stuff, and we didn’t discover any real difference.
They also tried replicating the issue, but this unfortunately didn’t show us anything too alarming.
I’ll need to figure out a way to submit a bug report while I prepare the stuff for this. As far as I am aware, there is no possible fix for this. My scripts are (unfortunately) going to have to break until it somehow fixes itself one day.
Thanks for the help, I’ll leave this post unsolved if someone somehow figures something out.
I made a script that checks the Humanoids state. It’s a local script, located inside the Player Model.
When the characters state changes, this is what the state checker prints while the gun is bugging out:
But for some reason when I shoot the gun and check the state then, the script in the gun prints Enum.HumanoidStateType.None.
p.s: the gun script is a local script. I check the humanoid state on a client script before requesting to shoot a bullet on the gun
Any theories on what this could mean? I am confused as to how one script reports the normal Enum.HumanoidStateType.Running while the other reports Enum.HumanoidStateType.None.
I found out the issue, and it appears to be resolved, but as with most things in this engine it’ll find another way to inconvenience me.
Turns out if you try indexing the Humanoid in certain ways, I guess the script holds onto some form of unprepared humanoid or something and always returns Enum.HumanoidStateType.None because the index at the time probably stored an unready Humanoid that was probably nil.
I even got this result by deleting the humanoid and quickly firing the gun when the gun was working just fine, and it returned the Enum.HumanoidStateType.None naturally. As for the state checker script, that was removed prior to getting that result.
Apparently yielding the script at the beginning gives the script time to index the correct humanoid.
I still don’t get how it was working sometimes, and sometimes not, but this was the closest lead I had, and putting
script.Parent.Tool.Equipped:Wait() somehow fixed the issue.