#How to make sound starts playing when GUI is clicked
1 messages · Page 1 of 1 (latest)
Clicker.MouseClick:Connect(onclick)
I’ll try as soon as i get home
are u using clickdetectors for the ui?
Yes
tf
Oh
Doesnt work :((
I dont have click detection
this is what it looks like
oh wait-
what should i do then?
@static atlas
then how can i do it?
OMG NOT THE REMOTES PLEASE- I LITERALLY SUCK AT IT
i mean i suck at scripts too
add something like this
but remotes is harder for me
k
and this here
okay
yes
for i, v in script.Parent:GetChildren() do
if v:IsA("TextButton") then
v.Activated:Connect(function()
game.ReplicatedStorage:FindFirstChild("music"):FireServer(v:FindFirstChildWhichIsA("Sound"))
end)
end
end
and this in the local
where can i put them?
the audios you put in the buttons
is the event named Music or music
Music
for i, v in script.Parent:GetChildren() do
if v:IsA("TextButton") or v:IsA("ImageButton") then
v.Activated:Connect(function()
warn("SHOULD PLAY MUSIC")
game.ReplicatedStorage:FindFirstChild("music"):FireServer(v:FindFirstChildWhichIsA("Sound"))
end)
end
end
``` try this
and check output