Team Select GUI not disappearing even after player clicks

Hello, everyone. I have been trying to make a team select GUI and even after you click, the GUI does not disappear. I have been attempting to debug it and use Google’s new AI, and nothing has helped so far. Here are some screenshots and the code.

local Player = game:GetService("Players").LocalPlayer
local Blur = Instance.new("BlurEffect")

Player.TeamColor = BrickColor.new("White")
Blur.Parent = game.Lighting

script.Parent.MouseButton1Click:Connect(function()
	Player.TeamColor = BrickColor.new("Really red")

	game.StarterGui.TeamGui.Frame.Visible = false
	game.StarterGui.TeamGui.ChangeTeam.Visible = true

	Blur:Remove()
	Blur:Destroy()

	Blur = nil
end)


image

StarterGui is not the gui that each player uses, it’s an original copy of the entire gui.

The path to the gui a player uses would be
Game.Players.PlayerName.PlayerGui.GuiName

Instead of doing either of those paths, though, just do script.Parent.Parent.Visible = false

1 Like