My code runs according to how many players there are in the game

  1. What do you want to achieve? Having the tool working perfectly

  2. What is the issue? For each player that is in the game, the tool will clone it to however many players there is in the game
    example: (2 players in a game, that tool will clone itself 2 times)

  3. What solutions have you tried so far? Nothing since I cannot figure what the issue is.

My tool uses a remote event to send the server information for the player, if the player is approved the tool drops something, it is fine if there’s only 1 player in the game. But if there’s more than one it will cause problems

Thanks!

so you want every player to get a copy of the tool?

Sounds like you have a RemoteEvent:Connect() for handling it inside a PlayerAdded:Connect() since it is based on how many players are in the game. Would it be possible to see the code on the server?

No, you will spawn with the tool, now that i think of it the reason this is probably caused is because the remote is being handled in the tool

if that is the case you can put the tool under starterpack

Sure, i will send the code to you

the tool is a wallet ````````````````````````

it already is in the starter pack

So, if there are 10 players does it drop 10 stacks of cash? Or what was the issue? Is this code inside another function (such as a :PlayerAdded:Connect())?

Yes, No. the code is in the tool (wallet) which is probably the reason the issue is being caused

Should I change to a script in sss or something?

Wait hold on, yes that is the issue. Tools should not have serverside scripts in them most of the time. The issue you have is that each and every tool is connected to the event, and so when the event is fired, all tools receive that event.

Serverside scripts should pretty much always be in ServerScriptService.

1 Like

ok I will try it out, thanks man!

1 Like

Yeah, sadly I realized after all this time lol. fun to see my brain actually realize my own issue, thanks!

1 Like

dang, i have the same issue but i have no idea how to fix it

Is the script inside of a tool? (the thing you’re talking about)