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)