When I click the button once, it works
But when I click it again the sound won’t play. Any help is appreciated.
When I click the button once, it works
That is because you moved sound to head without cloning it so sound won’t exist when it try to find in Replicated storage again you can change code to
script.Parent.MouseButton1Click:Connect(function()
local plr = game.Players.LocalPlayer
local plrChar = plr.Character
local head = plrChar:WaitForChild("Head")
local s = game.ReplicatedStorage.Click:Clone()
s.Stopped:Connect(function() --Destroy Sound if it's stop playing
s:Destroy()
end)
s.Parent = head
s:Play()
end)
Btw I typing on phone not sure if auto correct messed up anything
Thanks! I forgot to clone. I am kinda tired rn.
Btw do you know any youtube tutorials on how to make gui effects?
Sorry I afraid I don’t have experience on GUI design so I can’t really find something interesting but if I can recommend try ripple effect by search
Roblox studio Button Ripple Effect
Thank you! Have a great day : )