Assuming you used a key input script to trigger the ragdoll, how can you accomplish that effect? I’ve tried a few things and I can’t seem to get it to work properly. I’m sure it’s very simple, but I’m a beginner programmer with very limited knowledge and some help would be appreciated.
Thank you for asking, because apparently I didnt even update the script link
However, the change that makes it so much smoother is the following:
On ragdoll, instead of disabling all the character/npc’s Motor6Ds, I disable all the Motor6Ds and leave the HumanoidRootPart’s Motor6D enabled, so it’s enabled at all times, and that somehow doesn’t mess with the replication.
This script isn’t working for me. The player’s animations still play and even if you disable the animation script, the ragdoll is still not working. This is a brand new place with no other scripts and the ragdoll script is the latest version. Hopeful for a fix very useful
BIG NOTE to anyone who will want to make server side r6 ragdoll.
I spent a lot of time trying to do this because nowhere is documented that HumanoidRootPart networkownership SHOULD BE setted after Stepped event, otherwise networkownership will be reseted (I did know that physics should be setted after this event, but nowhere it was told in context of networkownership, I just thought that it’s stupid and willn’t work).
Now it’s work as intended! No flying ragdoll characters. Thank you, Aspecturu for your simple but good module, ofcourse I refactored code, but it’s all about ragdoll logic. (Not like I never wrote ragdoll modules, I did. But they all were deleted because of flying ragdoll dolls).
I will investigate future problems related to ragdoll (If they will exist) and update info about their solution
I am not really sure what issue you are trying to fix here, it’s not a good idea to set the ownership of a player’s hrp to nil (aka the server), doing so will cause some very bad user experience because the player is no longer in instant control of their character, so what should be done instead is ragdolling the player on both the server and the client (Look at the R6RagdollClient script).
As for NPCs, their network owner is the server, it is explicitely being set by the script so that no player will automatically take ownership of NPCs and break the ragdoll. So all you have to do is set the RagdollTrigger to true to ragdoll and false to unragdoll.
Maybe it’s only my issue, but If I willn’t change networkowner to server, then I can just move character on client (So exploiters will have big advantages)
Hey, I don’t know if I’m stupid or not, but I can’t figure out how to get it to ragdoll on a keypress, as you said, I attempted to turn the bool value to true using a server script, but it doesn’t work.
Here is both my local and server script for turning the bool value to true:
--Local Script
local UIS = game:GetService("UserInputService")
local raggy = game.ReplicatedStorage:FindFirstChild("RagdollEvent")
local character = script.Parent
UIS.InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.R then
raggy:FireServer(character)
else
return nil
end
end)
--ServerScript
local raggy = game.ReplicatedStorage:FindFirstChild("RagdollEvent")
raggy.OnServerEvent:Connect(function(character)
local bool = character:FindFirstChild("RagdollTrigger")
bool.Value = true
end)
The error that keeps coming up is that I attempted to write a value to nil, hinting that it is unable to find RagDollTrigger, which for the life of me I can’t figure out why. Could be because I’m a beginner scripter.
¯_(ツ)_/¯
I didn’t have to use breakjoints, it would ragdoll properly without it, however it would start moving quite madly. To fix it I used platform stand instead, and it worked properly then, here’s the script if you wanna try it,
local raggy = game.ReplicatedStorage:FindFirstChild("DeathEvent")
raggy.OnServerEvent:Connect(function(player, character)
local bool = character:FindFirstChild("RagdollTrigger")
local hum = character:FindFirstChild("Humanoid")
if bool then
if bool.Value == false then
hum.PlatformStand = true
bool.Value = true
wait(0.3)
hum.PlatformStand = false
end
end
end)
PS: I did this in a server script, with the checking if it’s dead or not in a local script, which would fire an event.
local raggy = game.ReplicatedStorage.RagdollEvent
raggy.OnServerEvent:Connect(function(player)
local character = player.Character
local bool = character.RagdollTrigger
bool.Value = true
end)