I replicate and animate my NPCs on the client, the issue with this is that I can’t use any of robloxs built in physics and collision systems. Meaning all I have to work with, is the general size of the npc, and it’s position. How can I detect when a bullet hits it?
What do you mean by replicating on the client?
Simulate the trajectory of the bullet on the server, maybe? Not really sure what you’re asking
The NPCs model is animated and replicated on the client. The server only has access to it’s location and other basic information. The server cannot see or interact with the NPCs model. @robloxdestroyer1035 @stuart2202
Then you would have to do the bullet detection on the client
Dude what. Bullet detection on the client means hackers can abuse it.
If the NPCs are on the client they could also abuse that. If the NPCs are on the client and the server knows nothing about them then bullet detection also has to be on the client.
What is the benefit to creating the NPC on the client, and replicating data to the server? There’s definitely a better way around the problem.
Bro. Only the NPCs model ands animation are on the client, it’s literally just replicated it to the client it’s not actually on the client. All of its information is in the server which they can’t touch.
Dude it’s created on the server and replicated to the client
That makes zero sense. You’re creating it on the server, copying it’s data to the client (leaving the client to handle everything), and then replacing the server’s copy with only it’s properties?
I don’t understand what you mean, you said
but at the same time
Ok the people responding who don’t know how visual replication work please stop responding. . Im literally just replicating the model and animation of the army to the clients. That’s all I’m doing
Right here:
You said that the server “cannot see or interact with the NPC’s model”, and it “only has access to the location and other basic information”, which leads me to believe that the model just isn’t on the server at that point, and all it has is a mere table of it’s values.
If the model and animation are replicated to the client (i.e the data exists on the server and is sent to the client), what’s stopping you from doing hit detection on the server?
You’re exactly correct with ur bottom statement. Idk how that means I’m replacing the servers info with anything. No info on the server is being replaced
Dude. OMG I’m trying to figure that out bro. I’m saying I can’t just use robloxs built in physics that are usually used to detect these things. Because there are 0 parts on the server. Literally just the general shape of the NPCs hitbox and it’s position is all I know
What i mean to ask is, why not?
Why not just have the NPCs model on the server?
When you create something on the server, you create everything about it on the server. And you’re telling me I’m correct with the fact that the model isn’t on the server?
I still don’t understand why you’re using a replication method like this. This sounds like an overly complicated way of creating the NPC on the server, and instead of playing the animations on the server (to save resources), you play the animations on the client.
This doesn’t mean outright deleting the model on the server, you can simply just do the hit detection on the server.