i made a team change Gui that changes your team using remote event I realised that the players can spam the remote event this can cause lag since the player spams changing his team. tried using debounce on the client side but the exploiters can read/write everything in the client side so is there a way to prevent them from the server side . this is the team change code local script
script.Parent.MouseButton1Click:Connect(function()
local Fire = game.ReplicatedStorage.Clothingremote
Fire:FireServer("Cloth1","Really red")
end)
script in serverscriptservices
game.Players.PlayerAdded:Connect(function(plr)
local Clone = game.ServerStorage["Cloth Gui"]:Clone()
Clone.Parent = plr.PlayerGui
end)
game.ReplicatedStorage.Clothingremote.OnServerEvent:Connect(function(plr,Message,Color)
if Message == "Cloth1" then
plr.TeamColor = BrickColor.new(Color)
end
end)
also I made 3 team 1 team auto assignable 2 team unassignable.

3 comments
doesnt work ChillOut is not a valid member of model
realised Archivable of player character was set to false
:P thanks.