use visible but u just do if the script is in the button
local frame = script.Parent.Parent:WaitForChild("Frame")
use visible but u just do if the script is in the button
local frame = script.Parent.Parent:WaitForChild("Frame")
Okay. before i edit script again. im gonna get some info so i can make sure if it works. Do you have 1 frames or screen gui being visible and another 1 frames or screengui being not visible?
OMG I am soooo confused lol.
Can you show your script again?
What do u want me to show u?? I have changed it soo much from my old script and nothing works. All I have been given is confusion
Thatâs why i asked. Can you show it so i can see what youâre doing wrong if youâre doing something wrong.
To be honest I have no clue anymore
local frame = script.Parent.Parent:WaitForChild("Frame")
local wow = script.Parent
wow.MouseButton1Click:Connect(function()
frame.Visible = false
end)
I donât think you need a :WaitForChild()
for that. Is it not detecting the click? Try adding prints inside the .MouseButton1Click
event to see if it fires. If it still jot detecting the click maybe something covering the button.
Put this in a LocalScript (NOT A Script) inside the button:
local button = script.Parent
local StartUI = button.Parent
local frame = StartUI:WaitForChild("Frame")
button.MouseButton1Click:Connect(function()
frame.Visible = false
end)
This is simple, just create your screen gui. Put a frame inside, name it what you like. Then put your text button in, then add a script the screen gui and it should look something like this.
Local Frame = script.Parent.Frame -- put the name of your frame
Local Button = script.Parent.TextButton -- Put the name of your text button
Button.MouseButton1Click:Connect(function()
Frame.Visible = false
end)
Try this. Not assigning a variable for the button as there is zero point. Follow this word by word.
local player = game:GetService("Players")
local frame = player.LocalPlayer.PlayerGui.["Start UI"].Frame
script.Parent.MouseButton1Click:Connect(function()
frame.Visible = false
end)