Help to get the Physics properties without other actions (swimming, jumping, running, falling, …).
I want R6 and R15 solutions, that’s why I need to use Physics. I have another script to handle R6 and R15 with “BallSocketConstraint,” but the result is not the best.
Here’s the video where I show the problem:
Here’s the code that I use in the video:
local character: Model = script.Parent
local humanoid: Humanoid = character:WaitForChild('Humanoid')
local ragdolled: BoolValue = character:WaitForChild('Ragdolled')
local function changeState()
if ragdolled.Value then
--humanoid:SetStateEnabled(Enum.HumanoidStateType.GettingUp, false)
--humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
--humanoid:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
--humanoid:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
--humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics, false)
--humanoid:SetStateEnabled(Enum.HumanoidStateType.Running, false)
--humanoid:SetStateEnabled(Enum.HumanoidStateType.RunningNoPhysics, false)
--humanoid:SetStateEnabled(Enum.HumanoidStateType.Climbing, false)
--humanoid:SetStateEnabled(Enum.HumanoidStateType.Swimming, false)
--humanoid:SetStateEnabled(Enum.HumanoidStateType.Seated, false)
--humanoid:SetStateEnabled(Enum.HumanoidStateType.Flying, false)
--humanoid:SetStateEnabled(Enum.HumanoidStateType.PlatformStanding, false)
--humanoid:SetStateEnabled(Enum.HumanoidStateType.None, false)
humanoid:ChangeState(Enum.HumanoidStateType.Physics)
else
humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
end
end
ragdolled.Changed:Connect(changeState)