#TopBarPlus v3 error (?)

54 messages · Page 1 of 1 (latest)

misty flower
#

I tried to make TopBarPlus v3 open a frame and i tried for hours and didnt work this is my code:

local TopBarPlus = require(game.ReplicatedStorage:WaitForChild("Icon"))
local settingsFrame = game.StarterGui.bat.Settings.SettingsFrame

TopBarPlus.new()
    :setImage(11385161073)
    :align("Right")
    :setLabel("Settings")
    :bindEvent("deselected", function()
        settingsFrame.Visible = not settingsFrame.Visible
    end)
    :oneClick()```
#

This is what the docs say

dull island
#

is not the topbar what fails

#

u r searching the UI on the starter gui

#

the script is a localscript right?

#

@misty flower

misty flower
misty flower
dull island
#

u should search in the PlayerGui

#

local settingsFrame = game.StarterGui.bat.Settings.SettingsFrame

#

this

#

to this

#

:

#
local player = game:GetService("Players").LocalPlayer
local settingsFrame = player.PlayerGui.bat.Settings.SettingsFrame
#

Test that

misty flower
#

still dont works

#

lol

dull island
#

enable the output bruh

#

any err?

misty flower
#

wait

#

my fault

#

let me test again

#

bat is not a valid member of PlayerGui "Players.xblueoswx.PlayerGui"

dull island
#

:WaitForChild("")

#

local settingsFrame = player.PlayerGui:WaitForChild("bat")...

#

the same for all

misty flower
#

so

#

local settingsFrame = player.PlayerGui:WaitForChild("bat"):WaitForChild('thing')

dull island
#

yes

misty flower
#

but

#

uh

#

bat is a screengui

#

settings its a folder

dull island
#

yes?

misty flower
#

there is any way to quick find the frame?

dull island
#

?

#

that finds quick the frame

misty flower
#

without doing waitforchild like for 3 times

dull island
#

do only waitforchild on bat

#

it may work or not

#

the UI is not secure of being replicated

#

only use waitforchild on UI

misty flower
#

okay works

#

another thing

dull island
#

?

misty flower
#

if i wanna add animations

dull island
#

learn bout TweenService

misty flower
#

in open/close

#

i need to place the code into the same topbar script right?

dull island
#

yep

misty flower
tender coyoteBOT
#

studio** You are now Level 3! **studio

misty flower
#

ty for helping me

#

😄