Objects are not appearing to other players

When I was testing my game, I came across this bug where when a player presses a button, a object(Chicken) will spawn and do some tweens and get destroyed, all of this is in a local script by the way, but other players are not able to see the chicken on other players plot, only their own.
both the chicken spawning and destroying is in a module script.

I think is has to do with the chickens being spawn in the client, but not really sure if that is the case, hence why I came here to create a topic.

If you need a code sample please let me know.

2 Likes

Use a server script or use RemoteEvent | Roblox Creator Documentation.

1 Like

Client side means things going on the player itself and server sided means things going on with the whole server.

The reason why you are the only one that sees it is because it’s a localscript meaning it runs on their computer but not to the whole server therefore he is the only one to see it and not the server

4 Likes

This is because you are using the local script, and the local script doesn’t appear to other players, use it in a normal script

1 Like

Localscript is client-sided that’s the problem (youre using a localscript)

if client-sided then it would run the code locally, it means it will work for you only but not the others

and if you want to fix this just use RemoteEvent

1 Like

Since I have the whole function to spawn the chicken in a module script, would I have a server script listen for the call of the remote event then call the function in the module script to spawn the Chicken?

Yes, localscript will excute module locally so use normal script