This is the full script! Thank you for trying to help too!
local RemoteEvent = game.ReplicatedStorage.ChangeTeam
local frame = script.Parent:WaitForChild("Frame")
local blue = "Bright blue"
local red = "Bright red"
local function choose()
script.Parent.Frame.Visible = not script.Parent.Frame.Visible
end
frame.Red.MouseButton1Click:Connect(function()
RemoteEvent:FireServer(BrickColor.new(red))
choose()
end)
frame.Blue.MouseButton1Click:Connect(function()
RemoteEvent:FireServer(BrickColor.new(blue))
choose()
end)
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Event = ReplicatedStorage:WaitForChild("ChangeTeam")
local Frame = script.Parent:WaitForChild("Frame")
local RedBtn = Frame.Red
local BlueBtn = Frame.Blue
local BlueColor = "Bright blue"
local RedColor = "Bright red"
RedBtn.Activated:Connect(function()
Event:FireServer(BrickColor.new(RedColor))
Frame.Visible = not Frame.Visible
end)
BlueBtn.Activated:Connect(function()
Event:FireServer(BrickColor.new(BlueColor))
Frame.Visible = not Frame.Visible
end)
Are you trying to make the Frame invisible, or the Button that was clicked invisible?
Strange. The code you have provided (not mines) should have worked. I honestly dont see anything wrong with the code you provided, nor mines.
Could you show an image of the ScreenGui that shows the Frame, the buttons, and the script in the explorer menu?
I really dont see any problem with the code you have provided and the code I have provided as well. Are you sure there is no errors (OR warnings) in the output? Because if there’s not, then I have no idea what’s the problem. Maybe your remote event was named something else or…?