What do you want to achieve?
Hello, so i have a team change gui but everybody can exploit it and change his team by firing the change team event (i tried with a bindable function and a remote event)
When the change team button is clicked it fire the event and the server take the player and the brickcolor of the team of the player and apply it to the player.
What is the issue?
It’s exploitable and i don’t know how to do it.
What solutions have you tried so far?
I tried to fix it myself.
As @12Noob_19761 says you will need the server to do the team changing. That way a user can request to team change but the server can check if they actually should or not (I assume people shouldn’t be able to team change every second and mid-match).
To prevent exploiting in general, don’t trust the client. Let the client request stuff, but don’t let the client process stuff. I think DeadBlox has this covered so I will skedaddle, but good luck scripting
well then exploiters will obviously be able to fire the event regardless because you have no sanity checks like @Bdavid621 had mentioned above. maybe have it so they can only switch teams per match or have a long debounce for it, otherwise they can just do it whatever and whenever they want in regards to changing teams.