#NPC ragdoll not replicating to clients

1 messages · Page 1 of 1 (latest)

edgy perch
#

Having this really confusing issue where NPC ragdolls aren't being replicated to the client
What i've tried so far:

  • Tried the different options of PhysicsImprovedSleep and PhysicsSteppingMethod

  • Tried with & without the humanoid state stuff, makes no difference

  • Messed around with network ownership - makes no difference. currently I have it nil

  • Tried without the anchoring, also tried never unanchoring the npc, which works but is impractical

  • Seems to replicate properly slightly more often if the attach.CFrame part is commented out, however this is impractical since it turns the NPC into a spinning ball of flesh

  • Tried running each iteration on its own thread, seems to make no difference

  • Commented out all other NPC code - there is no code running on this NPC except for the code that spawns it, and the death handling.

PROBABLY IMPORTANT: If I increase the time the NPC is anchored for (lets say 0.5 seconds) it ALWAYS replicates properly to the client, but i shouldn't have to do that. If i have the wait timer at something inbetween like 0.33s, i see the NPC ragdoll on the client for a sec, but then it becomes stiff after it unanchors.

On the client: Stiff as a board
On the server: Ragdolls properly

edgy perch
#

on the rare occasion that it replicates the ragdoll properly, if I go near the npc it becomes stiff again, which is crazy because the network ownership is so nil i couldn't make it any more nil if i tried. i've even added a second for loop which ensures every part is nil

edgy perch
#

for now, my solution is just to set the NPC's network ownership to the player who killed it. unfortunately this means other players will usually not see the ragdoll, but it works for now