Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Cant make a frame.visible = false ?

Asked by
Split_s 21
2 years ago

its kiddna hard to explain but i have 4 guis . the first guy has a button that when clicked it hides the first gui and it makes the second one visible and so on. the gui works fine when i just enable it from the start but when it make it open with a proximity prompt , i click the button , shows the second gui but it doesnt hide the first gui anymore (im sorry but its kiddna hard to explain, here are the scripts tho)

Local Script In The Gui Gyazo

local prompt = game.Workspace.Map.Secrets.ManilaRoom.Table.Interact.ProximityPrompt
local doc1 = script.Parent.Doc1

prompt.Triggered:Connect(function()
    doc1.Visible = true
end)

Normal Script Inside The Button Gyazo

local doc1 = script.Parent.Parent
local doc2 = script.Parent.Parent.Parent.Doc2
local button = script.Parent

button.MouseButton1Click:Connect(function()
    doc1.Visible = false
    doc2.Visible = true
end)

Normal Script Inside The Second Button (Just To Understand How It Works) Gyazo

local doc2 = script.Parent.Parent
local doc3 = script.Parent.Parent.Parent.Doc3
local button = script.Parent

button.MouseButton1Click:Connect(function()
    doc2.Visible = false
    doc3.Visible = true
end)

Gyazo#1

Gyazo#2

I Would Appreciate If Anyone Could Help Me , Thank You.

0
So when the gui has reached the final stage of the message, which is the last button to close it, is that what you're trying to do? when you click the close button of the last gui it'll close the gui? and not repeat back to the first? xXLegendGamerz16Xx 231 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

Assuming that your "doc" objects are guis, the problem with it is that you're calling the guis with a normal script. If you're using surface guis then make sure that you control them only on the script side. If your using a normal screen gui then use local scripts.

If you have any questions or issues, contact me.

0
im such a dumba$$ , ty Split_s 21 — 2y
Ad

Answer this question