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

audio still not working whenever I land to my torso please help?

local sc = workspace.Part
	local debounce = false
	local hitm = sc.music
	sc.Touched:Connect(function(hit)
	    if hit.Parent:FindFirstChild("Torso") and debounce == false then
        debounce = true
        hitm:Play()
	        wait(.5)
        hitm.Ended:Wait()
	        debounce = false
	    end
	end)

1 comment

0

post your code inbwetween the codeblock (lua button)

1 answer

✓ Accepted answer

Make sure you are using r6 avatar and not r15. r15 has UpperTorso and LowerTorso. r6 has Torso. Hope this solves your problem

local sc = game.Workspace.Part
local debounce = false
local hitm = sc.music

sc.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("UpperTorso") and debounce == false then
		debounce = true
			hitm:Play()
			wait(.5)
			hitm.Ended:Wait()
		debounce = false
	end
end)

1 comment

0

For Some Reason It Wouldn't play even with the avatar issue going on

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