Bro stop trolling bro I’ma actually have to report u at this point
I have been trying to help you but what you have said about your issue has been contradictory and I’m afraid it makes no sense. As such I won’t be replying anymore, however I hope you find a solution.
Dude… Like if you don’t understand this please just stop replying Im 20 messages in, and still explaining how the replication of my NPCs work. Like I’m not here to tutor you two about how this works.
For anyone stumbling upon this mess, and actually understands how this works. Can you please provide info or resources on how this could properly be done
So readers can better understand and help, I think you should explain what exactly is happening between the server and the client without using any form of the word “replicate”. Are you cloning from replicated storage? Are you modifying locally an instance originating from the server workspace?
In server storage I have all of the NPCs data stored there. It’s literally just a bunch of values, there are no parts nothing but values. Whenever the NPC moves (when it’s position value changes) I think replicate a model of the npc to all the players and also animate it to all the players. The model only exists on the client, and the model has the same Name as the NPC folder in serverstorage
If I understand this correctly, you create the NPC data on the server then send this information is to the client where they create the actual model.
Since there are no parts on the server and you can’t rely on usual Roblox physics features, you may need to implement your own physics and collision detection on the server. How complicated this is depends on the complexity of your hitboxes. If you know the velocities of your NPCs and bullets, then on the server you can update their positions and check for collisions each heartbeat/tick.
To add onto what @stuart2202 said, you could do hit detection on the client. It’s actually a common practice to have hit detection be on the client in order to hide the latency for the player. You just need to verify the hit on the server which may involve doing some form of lag compensation on the server NPCs. In this case, you’ll still need to implement your own physics and collision detection system on the server though.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.