Hello, I am making a battlegrounds game and right now the ragdolls seem to float when the server ragdolls them. I don’t know how to fix this issue, and I’ve searched through a lot of places. The player’s death ragdolls work, but the ragdolls on npcs are not working.
I’ve tried setting the network ownership to server, setting platformstand to true, and everything else and it’s still not working As seen in the end of the video, the ragdolls falls down after 4 seconds for no reason?
Here is the function for ragdolling the npcs.
Module.Bot = function(bot)
task.spawn(function()
local H = bot.Humanoid
bot.HumanoidRootPart:SetNetworkOwner(nil)
if bot:FindFirstChild'HumanoidRootPart'and H.Health~=0 and bot:FindFirstChild'LowerTorso' then
H:SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
H:ChangeState(Enum.HumanoidStateType.Ragdoll)
H.PlatformStand = true
for _,v in pairs(H:GetPlayingAnimationTracks())do v:Stop(0)end
for _,v in pairs(bot:GetDescendants()) do
if v:IsA'Motor6D'and Module.Check(v.Name) then
v.Enabled = false
elseif v:IsA'BallSocketConstraint' then
v.Enabled = true
end
end
wait(5)
print("Up")
H.PlatformStand = false
H:SetStateEnabled(Enum.HumanoidStateType.GettingUp,true)
H:ChangeState(Enum.HumanoidStateType.GettingUp)
for _,v in pairs(bot:GetDescendants()) do
if v:IsA'Motor6D' then
v.Enabled = true
elseif v:IsA'BallSocketConstraint' then
v.Enabled = false
end
end
end
end)
end
Here is where I actually call this function.
if combo == 4 then
if game:GetService("CollectionService"):HasTag(hit.Parent, "Bot") then
-- Bots
M.Joints(char)
M.Bot(char)
else
-- Players
M.Ragdoll(char,true)
end
end
If you know why my ragdolls are floating, then please help.