Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

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

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?

2 comments

0

Please at least make an attempt at the code before asking here

0

I made an attempt at this and didn't share the code because it wasn't nowhere near what I'm looking for.

1 answer

✓ Accepted answer
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!

This discussion is preserved as it was. New answers, comments, and votes are closed.