can someone help me how I can have a sound continuously playing when pressing keys
function inputStart(obj, gameProcessed, plr)
if gameProcessed then return end
local equiped = player.Character:FindFirstChild(script.Parent.Name)
if obj.KeyCode == Enum.KeyCode.W then
if equiped then
Up:Play()
Left:Stop()
Down:Stop()
Right:Stop()
script.Parent.Sound:FireServer() -- Sound Plays
wait(.5)
script.Parent.SoundStop:FireServer() -- Sound Stop
end
elseif obj.KeyCode == Enum.KeyCode.A then
if equiped then
Left:Play()
Up:Play()
Down:Stop()
Right:Stop()
script.Parent.Sound:FireServer() -- same Sound Plays
wait(.5)
script.Parent.SoundStop:FireServer() -- same Sound Stop
-- Code that continues... It's the same thing
end
Whenever .5 ends, the sounds just have a seizure when I spam keys. I need to find out how to reset wait() or keep the sound playing when spamming keys

1 comment
It's not loop. did forget to mention that whenever you press those keys the volume goes to 1 for 0.5 seconds to 0. I want to reset that timer so it doesn't freak out from 0.5 to 0 when you spam keys.