I know this script isn't the most efficient, but i'm having troubles with it. I want to click a button and make fog go to 0 and play a thump noise got that done. It just won't work in local script that makes it so it will only happen to the person that presses it. It's either a simple mistake or the whole 9 yards. Thanks for helping!
local sound = script.Parent.Sound
local sound1 = script.Parent.Thump
function playsound()
sound:Play()
game.Ambient.FogEnd = 0
sound1:Play()
wait(1)
sound1:Play()
wait(1)
sound1:Play()
wait(1)
sound1:Play()
wait(1)
sound1:Play()
wait(1)
sound1:Play()
wait(1)
sound1:Play()
wait(1)
sound1:Play()
wait(1)
sound1:Play()
wait(1)
sound1:Play()
wait(1)
sound1:Play()
wait(1)
sound1:Play()
wait(1)
sound1:Play()
wait(1)
sound1:Play()
wait(2)
sound1:Play()
wait(3)
game.Ambient.FogEnd = 50
end
script.Parent.ClickDetector.MouseClick:connect(playsound)

5 comments
First in line 08 you started playing the Song, Once it plays it Plays, you don't need multiple plays.
I know but I want multiple thumps
You just explained what you were using, and that is your problem; you are using a 'LocalScript', and you are attempting to use a 'LocalScript' like a 'Script'-Script, 'LocalScript''s only working within a Player's Character, or in their 'PlayerGui', they aren't supported in the Workspace itself, use a regular 'Script' instead [Server-Sided]', also lines 8-36, that many lines are not necessary, con
*Consider using a 'for' loop? Also, just pointing out mistakes and errors, sorry if I sound harsh.
Use a Regular Script for ClickDetector.