My local script won't repeat when a function happens

When I click the button once, it works


But when I click it again the sound won’t play. Any help is appreciated. :smiley:

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

1 Like

Thanks! I forgot to clone. I am kinda tired rn.

1 Like

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
1 Like

Thank you! Have a great day : )

1 Like