Log in to vote

How to give a certain player access to change other players' teams?

Asked by 5 months ago

For example, there are 12 players in a game. 2 are admins and the others are normal players. I want to give access to admins to like, for example, change the team of the 5 players to blue and the other 5 players to red. I want to give access to admins to add more teams, too. Oh, by the way, I want to put this in a GUI.

1 answer

Log in to vote
Answered by 5 months ago
Edited 5 months ago

To Give Access To Only Admins You Can Do

local admins = {"RazorXX2", "OTHERUSER"}

local player = game.Players.LocalPlayer

if == admins then
    script.parent.visible = true -- make sure it is a local script and script is inside gui frame

to make admins make teams you can do

    local newteam ="Team")
    newteam.Parent = Teams
    newteam.Name = " NAME"

i wont answer more as this isnt a request site

the script is not even correct, you need to use a pairs loop and loop through the table and see if one of the player matches with the table corresponding value, it's not valid to see if a player name is equal to a table Xapelize 1971 — 5mo
you should never trust the client with any important data because exploiters can easily manipulate it, and that includes the names of admins OfficerBrah 494 — 5mo

Answer this question