Log in to vote

How can I change the name and color of a team with a script?

Asked by 9 days ago

My script duplicates the default team and edits some properties, this works in the explorer, however, in game it shows that there is another white team called default.

here is my script:

local input = script.Parent
local button = input.Parent
local place = button.Parent.ScrollingFrame
local team = place.TextButton
local default = game.Teams.Default

    local addedteam = team:Clone()
    addedteam.Visible = true
    addedteam.Text = input.Text
    addedteam.Parent = place
    local teamteam = default:Clone()
    teamteam.Parent = game.Teams
    teamteam.Name = input.Text
    teamteam.TeamColor ="Bright bluish green")
Did you do all this in a local script? If so that might be the problem realchricrocgamer 0 — 9d
Also is there any errors in the output? realchricrocgamer 0 — 9d

1 answer

Log in to vote
Answered by
SynnDC 8
9 days ago
Edited 9 days ago

First I would start off saying that I did not make this script, ScriptLocalize did.

I recommend using this script as it works and is great to learn off of.

Link to the script:

Make a script in ServerScriptService then insert this script inside the script:

local function guestTeamJoin(player)

    local guestTeam ="Team")
    guestTeam.Parent = game:GetService("Teams")

    guestTeam.Name = "Guest"

    guestTeam.AutoAssignable = true
    guestTeam.TeamColor ="Really red")

    player.Team = guestTeam

    local guestSpawnLocation ="SpawnLocation")
    guestSpawnLocation.Parent = workspace
    guestSpawnLocation.Parent = game:GetService("Teams")

    guestSpawnLocation.BrickColor ="Really red")
    guestSpawnLocation.Neutral = true
    guestSpawnLocation.TeamColor ="Really red")


Answer this question