Is a tool giver better on a client or server script?

What type of script would be better for a tool giver?
As you all know, a tool giver can be implemented via:

  • A local script inside screen GUI, starter pack, starterplayerscripts, etc.
    that detects mouse input and gets the part[mouse.target] with the necessary script for cloning the needed tool from replicated storage and other similar functions.

or

  • A server script inside the part with a click detector and get the player through the first argument for the Touched function

which method would be better,
also, reply with your reason,
The main criteria for judging is performance.

Thank you for your time.

1 Like

I’d pick server due to exploits.

also , here’s the 3 ground rules you should follow always.

GROUND RULE 1 : NEVER TRUST THE CLIENT.

ground rule 2 : NEVER TRUST THE CLIENT

ground rule 3: make sure to usually use server and NEVER TRUST THE CLIENT.

4 Likes

pro tip 1:
NEVER TRUST LE CLIENT
exploiters can easily access client sided stuff

thank you for your inspiring insight.
:laughing:

make sure to follow the 3 ground rule at all times

2 Likes

I realized that immediately i posted the reply and deleted it.

The biggest rule is to never trust the client, only mess with the client side if you have to. (i.e; camera manipulation, UIs, etc…)

For something like this, you need to use the server side.

Tools should be handed out by the server, not the client. Here’s two reasons I can think of as of right now:

  1. If the tool is controlled by a server-script, it won’t work as the script hasn’t noticed that the tool has been parented by the client (the change wouldn’t replicate).

  2. Never trust the client: As in, do the logic on the server.
    I see no reason for you to handle tools on the client.

1 Like

Here’s a twist, what if the tool is determined by data that is stored in player UI,
or maybe based on another tool being equipped?

The data within the tool can be changed on the client through some sort of local script within the client, its just you have to give out the tool from the server since otherwise it wont replicate.

I’ve decided to use ray cast from the Client to trigger a remote event but thank you for your time.