Correct way to spawn a ped?

I’m trying to spawn a few chickens up at the Cluckin’ Bell Farms.

I have tried to spawn them on the server, sending the network id to clients, so the clients can TaskStartScenarioInPlace(id, “WORLD_COYOTE_WANDER” …). This causes them to spawn in the wrong place/not show up properly (late spawn?) and the animations don’t work.

I have tried spawning them on the clients locally, but the animation doesn’t work, though they’re in the right place, stationary.

I have successfully spawned them on the clients with network set to true but now there’s X number of chickens per player; want 10 chickens, 10 players but I get 100 chickens.

What can I do to fix this? Is the animation failing because ‘a_c_hen’ doesn’t support WORLD_COYOTE_WANDER? It does work if spawned with isNetwork true, but again, too many chickens this way as each client spawns more.

Thanks,
Jim

The way I do this in my hunting script is spawn the ped on the server, then send the network id to a nearby client (as you have already tried), then I have the client execute TaskWanderStandard. Note importantly, that I wait 1000ms after the client event is received to make sure the client has time to “sync” with the server and locally spawn the ped that the server created, then I get the entity from the network id.

tl;dr: try adding a delay on the client after the event is received, and try using TaskWanderStandard.

Hopefully that helps.