Team Change GUI

Hello there, I am a new scripter and I am trying to script a team change GUI for my game. Although, whenever I click the button to change teams, it puts me on a Neutral team, and not on the correct team. This is the script I am using, of course there are other parts, but I have a feeling this would be where the issue would be. Please help!

local menuButton
local frame = script.Parent:WaitForChild("Frame")

local RacerColor = "Bright Red"
local PitCrewColor = "Bright Yellow"
local FanColor = "Bright Green"
local FlagWaverColor = "Bright Blue"

frame.Racer.MouseButton1Click:Connect(function()
RemoteEvent:FireServer(BrickColor.new(RacerColor))
end)

frame.PitCrew.MouseButton1Click:Connect(function()
RemoteEvent:FireServer(BrickColor.new(PitCrewColor))
end)

frame.Fan.MouseButton1Click:Connect(function()
RemoteEvent:FireServer(BrickColor.new(FanColor))
end)

frame.FlagWaver.MouseButton1Click:Connect(function()
RemoteEvent:FireServer(BrickColor.new(FlagWaverColor))
end)
2 Likes

Never mind, I found that the issue was that the colors I entered were case sensitive, so it wasn’t recognizing the variables as colors and putting me on a non-colored team.

2 Likes