Hello! My goal is to get an npc to dash forward, but only for one client. I tried adding a linear velocity to the npc client sided, but it doesnt work, and i think its because the client needs network ownership to apply physics to the npc, but since I only want the dash to be seen on one client, i cant change the network ownership. Is there a way to get the NPC to do this?
Edit: For context, i’m trying make a turn based battle, and on the enemy’s turn the npc will attack all players in battle. However, it is done on the client side, so the attack will look different between players. This specific npc is supposed to dash towards the client, so on different clients the npc will dash to different locations, based on the client’s position. Hope this context helps
this method is not tied dirrectly to server nor client.
You can call it on client.
Aslong as you or server (nil) owns network of object you should be fine.
that didnt work either. though… i thought setting network ownership of the npc to nil will make the server have network ownership of the npc, which the server already has. i think the client needs to have network ownership to do anything physics related (like applyimpulse) to the npc.
when i tried setting the network ownership to the player everything works fine so i think network ownership is the issue
You can make it far simplier:
Make humanoid rootpart on a client and replace it.
Giving you isntant control over assembly while keeping rest synced with server.
This is difficult with a server-side NPC. Your best bet might be to make the NPC on the client entirely, or make a clone of the NPC for the sakes of effects and animations like this (either when combat starts, or just before the dash effect).
If the client doesn’t have network ownership of the NPC, the server will keep updating it with its actual position, and desync will likely happen, which you don’t want.