You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? I want to make a click button that when a player clicks it, the player hears a sound, but if the player smashes the button, the button doesn’t work after a few seconds and doesn’t play a sound.
What is the issue? The issue is that, when you click the button, a sound plays but if you smash it with clicks, it plays the sound as many times as you click the button and I don’t want that.
What solutions have you tried so far? I’ve looked for tutorials, and in the forum but there’s nothing. I don’t have very good scripting skills.
This is my first post btw, and I would appreciate it if someone helps me!
Internal screaming The first thing I’m gonna say is why do you have so much “D1/D2/D3” things? Anyways
You can put this instead when it first fires:
local FireOnce = false
local Sound = workspace.SoundSomething
function onClicked()
if FireOnce == false then
FireOnce = true
Sound:Play()
end
--Other lines of code here
end
script.Parent.ClickDetector.MouseClick:Connect(onClicked)
Oh yeah well, the other script that I sent wasn’t the one where I should have put your script but anyways, here it is the truly one. Don’t know what line to put it