GUI changing script won't work

Hello. I was trying to script a GUI to make a Tiktok video about those android 13 installer thingies.
I tried to script one, but it doesn’t work.
Script:

local menui = script.Parent.Parent
local screen = script.Parent.Parent.Parent.ScreenGui
local menuii = script.Parent.Parent.Parent.menu2
local uhoh = script.Parent.Parent.Parent.error

menui.Reset.MouseButton1Click:Connect(function()
	menui.Enabled = false
	menuii.Enabled = true
	wait(2.5)
	menuii.Enabled = false
	screen.Enabled = false
	uhoh.Enabled = true
end)

Im not sure but i believe the Error part is messing things up, and also if you are trying to hide a frame you use .Visible = false but other than that idk

1 Like

would be something like

don’t forget to change the actual frame name

Im pretty sure its just that you forgot to make menui visible after the wait again
maybe at the end do this

    -- rest of code above
    menuii.Enabled = false
    screen.Enabled = false
    uhoh.Enabled = false
    menui.Enabled = true
end)

yea maybe because error is used with no caps

(but idk because for error you need to use () at the end)

Still won’t work. I don’t know what is stopping the script from working.
Btw heres the GUIS in the explorer:
image
I changed some GUI names:
Error > OHNOES
menu2 > menuloading

Try a local script.

Also, what is the problem here, can you explain the error?

The error is: The script would stop working at the first 5 lines.
Also using a LocalScript wouldn’t work either.

Alright, I rewrote the script and still does not work.

local player = game.Players.LocalPlayer
local button = script.Parent
player.PlayerGui.guis.hide.Visible = true
player.PlayerGui.OHNOES.Enabled = false
player.PlayerGui.menu1.Enabled = true
player.PlayerGui.ScreenGui.Enabled = false
player.PlayerGui.menuloading = true

button.MouseButton1Click:Connect(function()
	player.PlayerGui.OHNOES.Enabled = false
	player.PlayerGui.menu1.Enabled = false
	player.PlayerGui.ScreenGui.Enabled = true
	player.PlayerGui.menuloading = true
	wait(2)
	player.PlayerGui.OHNOES.Enabled = true
	player.PlayerGui.menu1.Enabled = false
	player.PlayerGui.ScreenGui.Enabled = false
	player.PlayerGui.menuloading = false
end)