FrameVisibleScript does not work

Hello!Today im faced a problem.

wait(14)
local player =game.Players.LocalPlayer
local frame =player:WaitForChild("StarterGui"):WaitForChild("LUDUSMORTIS"):WaitForChild("FRAMESCRIPT")
frame.Visible =false
task.wait(5)
frame.Visible = true

The goal of the script is to make the frame invisible.The script did not show any spelling errors.But when I start the game, the frame is not invisible. It is on the screengui and does not disappear. I was going to do a gui animation.

Bye!

maybe something like this :slightly_smiling_face:
player:WaitForChild("PlayerGui")

Try this

wait(14)
local plr = game.Players.LocalPlayer
local PlayerGui = plr:WaitForChild("PlayerGui")
local ScreenGui = PlayerGui.LUDUSMORTIS
local Frame = ScreenGui.FRAMESCRIPT
Frame.Visible = false
task.wait(5)
Frame.Visible = true

Use

player:WaitForChild("PlayerGui")

Your script is not working as ‘StarterGui’ is not a valid member of a player. It changes to “PlayerGui” when the player is loaded into the game.

Visible is not valid member

asmdaldmwa'ldmwl'

What does it mean?
image

Try the method at 3- first. if didn’t work! answer these questions

1- What’s your frame name!
and your screengui.
2- where script placed.

3- Try this: [rq method. place the localscript to startergui] answer these questions! if worked solve that

4- Solve the problem! if the thing fixed.

1 Like

i think you shall check this line:
local frame=player:WaitForChild(“StarterGui”):WaitForChild(“LUDUSMORTIS”):WaitForChild(“FRAMESCRIPT”)
check your frame s parent again

or
local statergui = player:WaitForChild(“StarterGui”)
local gui = startergui:WaitForChild(“LUDUSMORTIS”)
local frame script = gui:WaitForChild(“FRAMESCRIPT”)
— do stuff

Its saying that you cant make a local script not visible

1 Like

It seems you are trying to make a local script visible?

1 Like

No!Im try to make a frame nonvisible

Can you show us the script’s Container?

According to the error, you are directing to a LocalScript. This explains why the Visible property is not a valid member of a LocalScript.

However, I might help you using this script.

local player = game.Players.LocalPlayer
local frame = script.Parent -- // change this to the path of the UI or if the script is parented to the gui then keep it like this.

wait(14)
frame.Visible =false
wait(5)
frame.Visible = true
1 Like

https://developer.roblox.com/en-us/api-reference/function/Instance/WaitForChild

WaitForChild

  • Returns the child of the Instance with the given name. If the child does not exist, it will yield the current thread until it does.
  • If a call to this function exceeds 5 seconds without returning, and no timeOut parameter has been specified,
    a warning will be printed to the output that the thread may yield indefinitely;

I think your referencing to the a localscript, not a frame

1 Like