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

How to Make Other Guis Appear On Click? (SCRIPT)

Asked by 4 years ago
Edited 4 years ago

So, I'm trying to add that once I've clicked the start game button, I want the customize GUI to appear. But it doesn't appear. What seems to be doing wrong?

local PlayButton = script.Parent
local SwitchFrame = script.CharacterFrame  
PlayButton.MouseButton1Click:Connect(function()
wait(0.1)--Duration before it goes away
script.Parent.Parent.Parent.Visible = false
SwitchFrame.Visible = true
end)
0
Can you please post your script since who reads your question doesn't know what ur doing wrong. User#32819 0 — 4y

1 answer

Log in to vote
0
Answered by
14dark14 167
4 years ago

Probably this is the error in your script

script.Parent.Parent.Parent.Visible = false

Because if the other GUI is inside "script.Parent.Parent.Parent" and then you make that frame or whatever it is invisible everything that was inside the frame becomes invisible as well.

So what really you should do is make 2 separate frames and make the TextButton make the other frame visible and the main frame invisible

Again you didnt provide much context so not even sure whar is causing that. maybe you didnt locate the button corectly in the script so this maybe could fix it.

local PlayButton = script.Parent.Parent
local SwitchFrame = script.Parent.CharacterFrame  
PlayButton.MouseButton1Click:Connect(function()
wait(0.1)--Duration before it goes away
 script.Parent.Parent.Parent.Visible = false 
SwitchFrame.Visible = true
end)
Ad

Answer this question