My gui isnt working

i dont understand why it wont work

1 Like

Almost sure this happens because the script runs before the gui loads, you could try using :WaitForChild()

just to be sure, could you provide the whole script?

1 Like

As @KLL3o said, the client hasn’t had time to register the children.
You could do the following:

local player = game.Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local mouseFrame = playerGui:WaitForChild("MouseFrame")
local frame = mouseFrame:WaitForChild("Frame")

local clickCursor = mouseFrame:WaitForChild("ClickCursor")

frame.Visible = true
clickCursor.Visible = true

Can you show your player gui in explorer?

Did you actually name your frame “MouseFrame”?

Also, you can avoid all that :WaitForChild() bloat if your script is under StarterCharacterScripts.

Screenshot 2024-01-06 124320

1 Like

this is a game i started and never finished

So what gui are you trying to get? I see no mouseframe

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.