Script not finding ui

So a script to open a menu isnt opening heres the error message


and the ui is where it needs to be and in the script its the same name so idk why its giving me the error and the ui still wont open

1 Like

Use WaitForChild()

game.StarterGUI:WaitForChild(“CoreGui”):WaitForChild(“TopbarPc”)…

1 Like
local ui = script.Parent

This will not work. StarterGui doesn’t contain active UI, it just holds what each player will get in their PlayerGui. You’re supposed to index PlayerGui instead to get Player UI.

3 Likes