#Need help with Buttons and Sounds.
125 messages · Page 1 of 1 (latest)
I had to
No
I’m on mobile
This helps more
Hang on
Don’t sounds have to get preloaded?
I haven’t used sounds in ages
Well yes, but do the scripts not have to preload sounds, a tad like animations
I just checked and it should be enough
Mind quickly checking that the sounds do actually work?
Just have some basic script that just does task.wait(3) and then plays one of the sounds
Check if MouseButton1Click fires in the first script
Or second
Doesn’t matter
Okay
Mind printing Buttons
The entire table
Anywhere
I just want to know the entrees
(Yes I know it should be the buttons, but I suspect it may be declared too early)
Sorry what?
…
I meant the variable
but to be frank
I already know that it’s empty
Do you know how to use PreloadAsync?
damn it, now I have to go through old code as I forgot what service it's in
or wait
contentprovider
local C = game:GetService("ContentProvider")
C:PreloadAsync(script.Parent:GetChildren)
put that in the start of the script, it will make the script yield until the buttons are loaded in
forgot the ()
:GetChildren()
I see
add another :GetChildren()
when declaring Buttons
first one
but again with ()
it's still a method...
frame?
oh right
wait what
the layout I understand
but what frame?
mind showing the current code?
well it did
but it shouldn't itterate over that frame
yes, but it shouldn't iterate over that one
just the children
hmm
still odd that it gets the frame
but inside the first loop add in
if button.Class ~= "Button" then continue end
?
odd
hang on
ClassName
sorry
good, the first loop now works
now we have the same problem as before
you again forgot the difference between an instance and a table
eh just add :GetChildren()
yet also be aware
you'll have to go into the instance to get the actual button
as you'll be looping through the frames
as seen here
it's not that difficult
for _, frame in frames do -- or in closebuttons are whatever
if not frame.CloseButton then continue end
frame.CloseButton.MouseButt...
yes that should work
try running it and see if it returns an error
have you added :GetChildren() yet?
are you sure?
...
I have no clue what line 30 is
oh wait
put it in that line
you see line 15, right?
add basically that but in that loop
wait hang on
why do you have 3 loops?
top one is for the open buttons
bottom for the close buttons
the one I told you to add was for the exit buttons
that middle loop does nothing
Just causes errors due to the way your ui is set up
but the bottom loop fixed that issue
...
for the third time
:GetChildren()
on this line
yes
also, line 11 is useless
even not the open sounds?
any of the debug prints not printing?
not even "Buttons"?
print(button.ClassName) before the if
wait what
why does it not give you the classname?
mind showing your code?
.
so above line 14
I see
doesn't matter yet
Change the string inside the line that checks the ClassName to "TextButton"
okay
that's my next question
what the fuck is MouseHover?
MouseEnter exists, never heard of MouseHover
MouseEnter
I already said that
mind showing the current script?
mind showing me the line that makes the sound play?
in case you also can't find them: add them
in case you wish to hire an actually competent scripter: my dms are always open
Who said money?
I only accepted liquid assets (beer)
to be frank
if it's a good idea then I'll do it for free
or well, %
only the ipa
the beer itself is not the best
@cursive patrol I wasn't actually kidding, I don't mind helping script your game for a %
eh, neither do I, and the comms I get keep getting worse