Simply, when I use a local script to edit guis it doesn’t work.
The local script it located inside StarterGui(Previously located in the button itself it still didn’t work then.
Script:
script.Parent.ScreenGui.Frame.Help.MouseButton1Up:Connect(function()
local black = script.Parent.Black.Blackout
local Main = script.Parent.Main.Main
local ScreenGui = script.Parent.ScreenGui
repeat task.wait(0.001)
black.Transparency -= 0.1
print(black.Transparency)
if black.Transparency == 0 then
Main.Visible = true -- This part failed
ScreenGui.Enabled = false -- This part failed as well
end
print(black.Transparency)
if Main.Visible == true then
print("Visible")
else
warn("Failed")
end
until black.Transparency <0
repeat task.wait(0.1)
black.Transparency += 0.1
until black.Transparency == 1
end)
Output:
![]()
My goal is to make a blackout frame that goes from transparent to not transparent and when its at 0 transparency(when it first appears) I want it to Disable a Gui and make a frame Visible, that’s what went wrong.
(Sorry if my grammar is bad, not sure what’s on today with my grammar.