What should own a character accessory?

One of my biggest weak points is determining whether to execute a block of code on the server or on the client. I’m currently working on a hood system that allows a player to toggle whether or not they’re wearing a hood by pressing a key. Dropping in the hood and pinning it to the character is no problem, but I’m not sure if I should execute that on the client or the server.

This is part of a project for a client, so speedy help is appreciated. Thank you!

Client > Server > All Client

Thats the most basic. Without waiting, Client can do it instantly if you want.

Considering that this doesn’t seem to be something exploitable (if it’s just toggling it on and off), just make the client fire a remote to the server which then does any of the verification you need to do, then fire it from there for the rest of the clients.

It really depends on how it’s been setup and what exactly is happening - if the client can give itself anything, you want to be able to verify if it’s the right item on the server, etc. etc.

@ImT_x @EmeraldSlash Is it necessary to fire it on all clients? I thought I could do it on the server and it would replicate to all clients.

Yes, however there would be a delay for the user changing it.

You could drop/raise it on the client, fire the server, the server will update itself, and with it the rest of the clients.

1 Like

Yes but that would also override it on the client (ok probably won’t be an issue but just in case lol)

1 Like