Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why won't my script won't recognise that a Gui is open?

local Fix = script.Parent.Parent.Parent:WaitForChild("Fix")

local PrestigePanelIsOpen = game.Workspace:WaitForChild("PrestigePanelIsOpen")

local Frame = script.Parent.Parent.Parent:WaitForChild("Frame")

local ClosePanel = script.Parent.Parent.Parent:WaitForChild("ClosePanel")

Fix.Event:Connect(function()

PrestigePanelIsOpen = "true"

end)

if PrestigePanelIsOpen.Value == "true" then

while true do

print("it is open") --this is not printed

script.Parent.MouseButton1Click:Connect(function(click)

Frame.Visible = false

Frame.Active = false

PrestigePanelIsOpen.Value = "false"

ClosePanel:Fire()

end)

end

wait(0.1)

end This script closes a GUI. It was working before then my studio crashed and I lost it :(

2 comments

0

I N D E N T A T I O N A N D C O D E B L O C K S N O O B

0

waht r u attemtpting with that "Event" part?

1 answer

✓ Accepted answer

Your huge mistake is right here:

PrestigePanelIsOpen = "true"

Since you're re-defining the variable from a userdata to a string, the value checking line does not work. Simply remove the above line from your script and it should work.

3 comments

0

ur better off not answering this cuz this is basically cancer finding a human form

0

lmfao too late

0

ur still better off not answering

This discussion is preserved as it was. New answers, comments, and votes are closed.