Something like this, works?
if not Char.Humanoid.HumanoidStateType == Enum.HumanoidStateType.Dead then
–rest of the code
end
Something like this, works?
if not Char.Humanoid.HumanoidStateType == Enum.HumanoidStateType.Dead then
–rest of the code
end
Why not try it.
But I will tell you that it doesn’t work.
Because not has higher precedence over == so it is evaluated as false == Enum.HumanoidStateType.Dead.
if Char.Humanoid.HumanoidStateType ~= Enum.HumanoidStateType.Dead then
-- ...
end
Error: [HumanoidStateType is not a valid member of Humanoid] ![]()
Ah. You need to use the :GetState method of Humanoids to get the current state of it.
if humanoid:GetState() == Enum.HumanoidStateType.Dead then
-- ...
end
![]()
Thank you so much, this works, you helped me, much, in my gravity coil script <3