I’m making a detain tool for some people (i.e. a tool that basically welds a player in front of another player for bit), and it’s functional, but since the two players in the detaining process are welded, this causes issues on death. When one player dies, the other player dies as well. Right now, I’m working on solving this if the detained player dies, and I have it working to an extent:
This works partially. The first time, both players register that the detainer is not dead. Every time after that, the detainee thinks the detainer is dead and broken across the baseplate, while every other player (including the server itself) thinks the detainer is still alive.
I’ve seen some topics similar to this but I still don’t have any clue what to do. I have a feeling this has something to do with Network Ownership, but I’m not sure how to use it to get what I want. If anyone has any ideas on how to make this work, I would appreciate it.
Perhaps use :TakeDamage() instead, I think that has proper replication?
Humanoid states work quite oddly if you’re not using them in the network owner’s client.
I’m sorry, I don’t really understand what you’re saying. The end result is to make sure that when the detained player dies, the detainer doesn’t die as well. How are you suggesting I use TakeDamage() to achieve this?
Okay, I think the problem here has to do with the fact that :SetStateEnabled() doesn’t replicate at all, even from server to client. I guess I’ll need to script this with that in mind, or figure something else out. Thanks to everyone who responded.