Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would you add a sound on a double jump?

Asked by 8 years ago
Edited 8 years ago

I have this script in which you press space once and it does a action Then if you press space another time it does a completely different action I already know how to add sound to the first jump My question is How do I add sound on the second jump? Would it have to be a second script? I already have a script that adds sound when you jump but I want one sound when you jump first..and a different sound when you jump second.

jump = true

sound = game.Workspace.Sound

plr = game.Players.LocalPlayer

repeat wait()until plr.Character

local humanoid = plr.Character:WaitForChild("Humanoid")

humanoid.Jumping:connect(function()

ump = not jump

if jump then

sound.Volume=1.5

else

sound.Volume = 1

end

sound:Play()

end)

(void the spaces between each line)

0
In the script that makes your character double jump, just play a sound right after you make it happen. Perci1 4988 — 8y

Answer this question