Question about NPC visibility

How would I make an NPC that chases a player that is controlled by the server, but the NPC visibility is only one per client?

So we would not see the other same NPCs that are chasing other players, we will only see the NPC that is chasing us. So like the position of the NPC of each player is different, based on where the players are.

Here’s an example (Escape Papa Pizza’s Pizeria by PlatinumFalls)

2 Likes

im pretty sure you can just do Humanoid:MoveTo(localplayerChar.PrimaryPart.Position) in the client

Nope, doesn’t work. It behaves the same way such in server scripts.

1 Like

try setting the network owner to the player in the server, then move the npc in the client

Wait, I haven’t learn about that man. Would it work though?

it should be; cause the network owner is the one controlling that instance

Ok, what should do to get that done? Even though I haven’t learn about network ownerships.

sorry, i noticed it wasnt possible to set the network owner of an Instance to other individual players, but you can try to clone the npc for every player and set the network owner to the player respectively; then delete the other npc in the client

respectfully to the other guy hes wrong all you gotta do is make the npc chase the player in the client and when you wanna do something server sided like damage you can fire an event

How would I do that? so I insert a local script that chases players in the starterplayer? and then fire a remote event to the server??

Isn’t NetworkOwnership only with physics?

yeah, network ownership mainly affects the physics of a part, and it determines which player is simulating a part’s physics. in this case the player is simulating the npc

yes you can do that and put the localscript in his backpack, his playergui or starter player
then when you want to do anything server sided like damage etc you just fire a remote event

What’s the difference of putting local scripts in the starterpack, startergui, and starterplayer?

isn’t startergui for guis? starterpack for tools?

And I tried this before and it did not work

If you do this it will be pretty vulnerable to exploit as it’s controlled by the client so they can just destroy the Rig or the script directly. I don’ t get why you would want this tho as you could have one N.P.C and on the server you use functions to get the closest character.

I thought it would be cool to have an npc chasing for each player, so you’re saying the npc in the video I attached above can be exploited?

Btw I need answers to this too

It pretty much can, I do recommend you don’ t do this if you want important game’ s features to be safe from exploiters. You should do what I said because it’ s easier, efficient and managed on server, your safe zone exploiters can’ t touch

1 Like

Why not create the npc on the server, then make all the clients (except one) destroy or parent the npc to nil.