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

Help me with Welcome GUI. Can someone help me?

1 answer

✓ Accepted answer

I have checked out your script, there was nothing wrong with it, but I edited it anyway;

print("Gui Closer Located and initiated.") --This worked

local function onClicked(GUI) --Before, you didn't use 'GUI'
if GUI then --This checks if 'GUI' exists
GUI:Destroy() --This will Destroy the 'GUI'
end --This ends the code block for the 'if' statement
end --This ends the code block for the function

script.Parent.MouseButton1Down:connect(function() --This will, eh, I forgot, but this will connect the Event to the function
onClicked(script.Parent.Parent.Parent) --When the TextButton is clicked, it'll destroy the GUI
end) --This ends the code block for the Event/function

Another thing I noticed was that you were using a 'Script' type instance for the GUI, Roblox did an Update so that you [I think] can only use 'LocalScript' type instances for Client-Sided scripts, so, try using a 'LocalScript' for your Script, and maybe it'll work. :) Hope this helped!

2 comments

0

Thank you TheAlphaStigma. I haven't tried yet, but I am glad I got an answer from you and you helped me out. May God bless you.

0

No problem :) I was glad to help you out. :)

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