local plr = game.Players.LocalPlayer
local char = game.Workspace:WaitForChild(plr.Name)
local hum = char:WaitForChild("Humanoid")
local sound = script.JumpSound
stage = 0
jumping = false
falling = false
-- Jumps --
function onJump(val)
jumping = val
print(stage)
if jumping == true and stage > 1 and stage < 3 then
stage = 3
char.Torso.Velocity = char.Torso.Velocity + Vector3.new(0, 60, 0)
sound.Pitch = 1.5
sound:Play()
wait(1)
stage = 0
elseif jumping == true and stage > 0 and stage < 2 then
stage = 2
char.Torso.Velocity = char.Torso.Velocity + Vector3.new(0, 55, 0)
sound.Pitch = 1.25
sound:Play()
elseif jumping == true and stage < 1 then
stage = 1
sound.Pitch = 1
sound:Play()
end
end
hum.Jumping:connect(onJump)
function onFall(val)
falling = val
if val == false then
wait(0.25)
if stage > 0 and falling == false then
stage = 0
end
end
end
hum.FreeFalling:connect(onFall)
COMMUNITY QUESTION
Triple Jumping Script wont work after the player dies and I can't figure out why. Anyone can help?
1 answer
This answer is not from me but someone who helped me in the discord known as TwinPotatos but
All I had to do was move it to StarterCharacterScripts and change the sound variable to
local sound = script:WaitForChild("JumpSound")
So there's the answer
This discussion is preserved as it was. New answers, comments, and votes are closed.
