Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow team names with spaces to be created via :teams #1778

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions MainModule/Client/UI/Default/Teams.luau
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ return function(data, env)
self.Active = false
self.AutoButtonColor = false
self.Text = "..."
client.Remote.Send("ProcessCommand", string.format("%snewteam%s%s%s%s", data.CmdPrefix, data.CmdSplitKey, teamName.Text, data.CmdSplitKey, teamColor.Text));
client.Remote.Send("ProcessCommand", string.format("%snewteam%s%s%s%s", data.CmdPrefix, data.CmdSplitKey, `"{teamName.Text}"`, data.CmdSplitKey, teamColor.Text));
teamName.Text = ""
teamColor.Text = ""
wait(1.2)
Expand All @@ -98,9 +98,6 @@ return function(data, env)
end;
})

teamName:GetPropertyChangedSignal("Text"):Connect(function()
teamName.Text = string.gsub(teamName.Text, data.CmdSplitKey, "")
end)
teamColor:GetPropertyChangedSignal("Text"):Connect(function()
teamColor.TextColor3 = BrickColor.new(teamColor.Text).Color
--teamColor.TextColor3 = `{BrickColor.new(teamColor.Text:sub(1, 1):upper()}{teamColor.Text:sub(2):lower()).Color}` -- unfortunately we have BrickColors with names like "New Yeller"
Expand Down
Loading