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

Display a sound every time a player jumps when he's inside a certain block?

Asked by 4 years ago

I know this isn't a request site and we are supposed to at least try to do our best but I'm unable to do this myself. I'm new and I barely know the basic stuff. I'm not sure how hard this is, but what I've been trying to figure out is this.

When a player enters a certain area which will be a block that players can walk inside it. When they're inside of the block every time they jump a sound will play out. Instead of the regular Roblox Jump Sound, another sound plays. How can I make this?

0
Please at least make an attempt at the code before asking here jediplocoon 877 — 4y
0
I made an attempt at this and didn't share the code because it wasn't nowhere near what I'm looking for. ItsJZaid 45 — 4y

1 answer

Log in to vote
1
Answered by 4 years ago
local a = script.Parent
local jumpSound = script.Sound

a.Touched:Connect(function(hit)
    if (hit.Parent.Humanoid ~= nil) then
        while (hit.Parent.Humanoid.Jump == true) do
            jumpSound:Play()
            wait()
        end
    end
end)

Remember to mark as answer and upvote!

Ad

Answer this question