I was making a Team GUI for my friend, but when I try testing it, the confirm button won't show visible when I select a team. Why is this? Scripts below:
LocalScript for the RemoteEvent:
local teamRE = game:GetService("ReplicatedStorage"):WaitForChild("teamRE") -- Remote Event
local civilianColour = "White"
local swatColour = "Really black"
local tpdColour = "Lapis"
local stColour = "Really red"
local teamGUI = script.Parent.Parent
local mainFrame = teamGUI.MainFrame
local confirmBtn = mainFrame.confirmBtn
local visibilityBtn = mainFrame.visibilityBtn
local teamsFrame = mainFrame.TeamsFrame
local civilianLbl = teamsFrame.civilianLbl
local stLbl = teamsFrame.stLbl
local swatLbl = teamsFrame.swatLbl
local tpdLbl = teamsFrame.tpdLbl
confirmBtn.Visible = false
if mainFrame.Visible == false then
mainFrame.Visible = true
confirmBtn.Visible = false
end
civilianLbl.MouseButton1Click:Connect(function(plr)
teamRE:FireServer(BrickColor.new(civilianColour))
end)
stLbl.MouseButton1Click:Connect(function(plr)
teamRE:FireServer(BrickColor.new(stColour))
end)
swatLbl.MouseButton1Click:Connect(function(plr)
teamRE:FireServer(BrickColor.new(swatColour))
end)
tpdLbl.MouseButton1Click:Connect(function(plr)
teamRE:FireServer(BrickColor.new(tpdColour))
end)
Server Side script for Remote Event:
local teamRE = game:GetService("ReplicatedStorage"):WaitForChild("teamRE")
local confirmBtn = game:GetService("StarterGui").teamGUI.MainFrame.confirmBtn
teamRE.OnServerEvent:Connect(function(plr, TeamColor)
plr.TeamColor = TeamColor
if confirmBtn.Visible == false then
confirmBtn.Visible = true
end
end)
If you can help, please do! :) Thanks for response!

1 comment
I'm sorry if I'm bothering you, but - Please could you help me make it so the team changes only when you press confirm? I tried doing it but it won't work...