Hello 5 min ago there was a roblox studio updated, when i updated i noticed that my ragdoll script doesn’t work anymore because :ChangeState() is not changing players state and i am sure of it. Has anybody else got this bug or is it just me (i also checked in game and its still not working)
Can we see your entire script so we can help you?
Server script:
game.ReplicatedStorage.Events.Ragdoll.Event:Connect(function(Player, Time, Force)
spawn(function()
if Force == nil then
Force = Vector3.new(0,100,0)
end
if Player:FindFirstChild("Stun") then
for i,v in pairs(Player:GetChildren()) do
if v.Name == "Stun" or v.Name == "StunPart" then
v:Destroy()
end
end
wait(.1)
end
local Tag = Instance.new("StringValue")
Tag.Name = "Ragdoll"
Tag.Parent = Player
game.Debris:AddItem(Tag, Time)
if game.Players:GetPlayerFromCharacter(Player) then
game.ReplicatedStorage.Events.RagdollClient:FireClient(game.Players:GetPlayerFromCharacter(Player), true, Force)
else
if Force then
Player.HumanoidRootPart:ApplyImpulse(Force)
end
Player.Humanoid.AutoRotate = false
Player.Humanoid.BreakJointsOnDeath = false
Player.Humanoid.RequiresNeck = false
Player.Humanoid:ChangeState(Enum.HumanoidStateType.Physics)
end
for i,v in pairs(Player:GetDescendants()) do
if v:IsA("Motor6D") then
local A0, A1 = Instance.new("Attachment"), Instance.new("Attachment")
A0.CFrame = v.C0
A1.CFrame = v.C1
A0.Parent = v.Part0
A1.Parent = v.Part1
local Ballsocket = Instance.new("BallSocketConstraint")
Ballsocket.Attachment0 = A0
Ballsocket.Attachment1 = A1
Ballsocket.Parent = v.Part0
v.Enabled = false
end
end
wait(Time)
for i,v in pairs(Player:GetDescendants()) do
if v:IsA('Motor6D') then
v.Enabled = true
end
if v.Name == 'BallSocketConstraint' then
v:Destroy()
end
if v.Name == 'Attachment' then
v:Destroy()
end
end
wait(.1)
if game.Players:GetPlayerFromCharacter(Player) then
game.ReplicatedStorage.Events.RagdollClient:FireClient(game.Players:GetPlayerFromCharacter(Player), false)
else
Player.Humanoid.AutoRotate = true
Player.Humanoid.BreakJointsOnDeath = true
Player.Humanoid.RequiresNeck = true
Player.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
Player:SetPrimaryPartCFrame(Player.PrimaryPart.CFrame * CFrame.new(0, 3, 0) * CFrame.Angles(0,0,0))
end
end)
end)
Local script:
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Camera = workspace.CurrentCamera
game.ReplicatedStorage.Events.RagdollClient.OnClientEvent:Connect(function(State, Force)
if State == true then
if Force then
Character.HumanoidRootPart:ApplyImpulse(Force)
end
Humanoid.AutoRotate = false
Humanoid.BreakJointsOnDeath = false
Humanoid.RequiresNeck = false
Humanoid:ChangeState(Enum.HumanoidStateType.Physics)
print(Humanoid:GetState())
else
Humanoid.AutoRotate = true
Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp)
Humanoid.BreakJointsOnDeath = true
Humanoid.RequiresNeck = true
end
end)
So before the update the ragdoll script worked, but after the update the ragdoll script didn’t work?
Edit: Out of curiosity, why aren’t you using Enum.HumanoidStateType.Ragdoll
?
yup and specificaly the humanoid:changestate() cuz everything else works the character doesn’t rotate, the character still “ragdolled” (all parts started moving freely) but you can still controll the character
Well, since Roblox just updated, that means a new Release Notes topic is going to be posted for the update. Maybe we should wait until we see what the new update changed?
Client states ~= Server states.
Changing state on the client doesn’t apply on the server
you can only change humanoids state on client side, when you change it on the servers it doesn’t work
i just found out the issue.
I think Running State overwrites all other states.
Just do this
workspace.kalabgs.Humanoid:SetStateEnabled(Enum.HumanoidStateType.Running,false)
maybe disable GettingUp too?
i just did a test with my module and it worked
https://www.roblox.com/library/9297726388/RagdollModulev2
No that doesn’t work, i thing that it might be a roblox bug
I tried to use the same script on a different game and it worked for some reason.