GUi problem (not showing)

b = script.Parent -- this is the button

function onClick()
	if script.Parent.Parent.Visible == true then
		script.Parent.Parent.Visible = false
		game.StarterGui.AdminPanel.KICKCMD.Visible = true
	end
end

b.MouseButton1Click:connect(onClick)

1 Like

I’m not really sure if understand this correctly but if this is a local script, you would want to find the admin panel through the local player’s GUI folder, not game.StarterGui. If that is the case, all you have to do is:

b = script.Parent -- this is the button
plr = game.Players.LocalPlayer

function onClick()
	if script.Parent.Parent.Visible == true then
		script.Parent.Parent.Visible = false
		plr.PlayerGui.AdminPanel.KICKCMD.Visible = true
	end
end

b.MouseButton1Click:connect(onClick)
2 Likes

Here are the “guidelines” here in #help-and-feedback:scripting-support

  • Tell us about your code.
  • Show your code.
  • Say what’s not happening.
  • Say what you need happening.

follow guidelines also tip anything with Starter in front of it is a template that will get cloned elsewhere to the player instance at runtime. Instead of doing

game.StarterGui.AdminPanel.KICKCMD.Visible = true

do

game.Players.LocalPlayer.PlayerGui.AdminPanel.KICKCMD.Visible = true
1 Like

Ah I understand now thank you!

2 Likes