#Making a bottom bar and its now working because of an error

1 messages · Page 1 of 1 (latest)

tired turtle
#

Im not too sure what the problem is but I know you guys are the best at this stuff so if any of yall wana dm me or walk me thought this im completely down for that

summer ginkgo
#

I think move.AbilityName is nil meaning it doesn't exist

hearty sparrow
#

And make sure move.AbilityName actually exists

tired turtle
atomic violetBOT
#

studio** You are now Level 2! **studio

summer ginkgo
#

I don't really know since idk how your whole system works but maybe you can try "print(move.AbilityName)" above line 13 and check the output to see what's actually there.

tired turtle
#

it did nothing

#

any other advice?

summer ginkgo
#

it didn't print anything above the error line?

cinder lion
#

it can't find "move"

#

also why r u handling UI on the server

tired turtle
tired turtle
cinder lion
tired turtle
#

not that I know of

#

no

#

would that be a problem?

cinder lion
#

can u show the entire script so I know what "move" is supposed to be

tired turtle
#
-- local AbilityModule = {}

function AbilityModule:SetupCharacter(player: Player, characterInfoTable)
    local PlayerGui = player.PlayerGui
    local BottomBar = PlayerGui:WaitForChild("BottomBar")
    local Buttons = BottomBar:WaitForChild("Main"):WaitForChild("Buttons")
    local Template = Buttons:WaitForChild("Template")
    
    for _, move in pairs(characterInfoTable.moveset) do
        print(move)
        local clone = Template:Clone()
        clone.Name = characterInfoTable.name
        clone.AbilityName.Text = move.AbilityName 
        clone.Keybind.Text = move.Keybind
        
        clone.Parent = Buttons
        clone.Visible = true
    end
end

return AbilityModule
#

there

hearty sparrow
#

:GetChildren() so jt returns a table?

tired turtle
hearty sparrow
#

You are trying to iterate over an instance in your for _, move in characterInfoTable.moveset

#

Add getchildren after the moveset

tired turtle
#

example?

#

im new to this sorry

hearty sparrow
#

Great ai coded it?

tired turtle
#

nope

#

lol never trust ai

hearty sparrow
#

Who even used pairs and ipairs

tired turtle
#

Zeeval did

hearty sparrow
#

Screenshot me your item structure

tired turtle
hearty sparrow
#

Youre iterating through an instance

tired turtle
#

so, whats the fix?

hearty sparrow
#

Try characterInfoTable.moveset:GetChildren()

#

Also you are trying to find things inside the moveset right?

tired turtle
#

yep

hearty sparrow
#

Then GetChildren() after moveset would be the correct way

#

Also what did you expect move to be?

tired turtle
atomic violetBOT
#

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

hearty sparrow
#

Oh moveset is already a table?

tired turtle
#

yea

hearty sparrow
#

Mb

tired turtle
#

sorry i didnt mention that earler

hearty sparrow
#

But it is a thing in the game right?

#

Can u send ss

tired turtle
#

right there

hearty sparrow
tired turtle
#

no?

hearty sparrow
#

Try it then. Your first pic error is that its expecting a string

#

Oh wait move doesnt exist doesnt it

tired turtle
#

nope

#

this is a tough one isnt it

hearty sparrow
#

Oh actually

hearty sparrow
#

why are u commenting the local AbilityModule = {}

tired turtle
#

ok

#

so i did as u sid

#

and it works but dosent at the same time

#

if that makes sense

hearty sparrow
#

No

#

Show the error broncharono

tired turtle
#

its not an error

#

js look

#

not what I need

#

:<

summer ginkgo
#

yea tostring is converting nil into string so it just becomes "nil"

hearty sparrow
#

Blud

summer ginkgo
#

it doesn't fix that it doesn't exist

hearty sparrow
#

" "

summer ginkgo
#

nono then it should be just empty since its still a string

#

it shouldn't give an error

tired turtle
hearty sparrow
#

????

#

Why are u sending an unrelating picture

tired turtle
#

those are the names

hearty sparrow
tired turtle
#

i have move names

limpid tangle
#

it's now working because of an error? aint we all been there hehe

tired turtle
#

and can u help?

hearty sparrow
# tired turtle

Can u please just try putting something in those empty " " first and see if it works

#

The picture i am replying to

summer ginkgo
#

It prolly won't work but nothing wrong in trying atp😭😭

limpid tangle
tired turtle
limpid tangle
#

empty string is not nil

#

;compile lua lua print(not "")

tired turtle
frail veldtBOT
#
Program Output
false

limpid tangle
tired turtle
hearty sparrow
#

VINCE

#

Atleast I tried 😭

tired turtle
#

uk to bing ig?

#

bind*

#

or smth of that sort? idrk

limpid tangle
# tired turtle or smth of that sort? idrk

so yea can only really help you with code you wrote yourself, not here to help you work a product or decompile a stolen script for that matter (not saying this is but it comes up)

#

ask the person you bought it from?

#

you get what you pay for

#

🤷

tired turtle
limpid tangle
#

you copied the tutorial wrong then

tired turtle
#

a guy named Zeeval?

tired turtle
limpid tangle
#

not sure what help you're expecting for copy+pasting someone elses code rong

tired turtle
#

thanks Vince

limpid tangle