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

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

Asked by 4 years ago
Edited by Ziffixture 4 years ago

Please encode Lua code in the Lua block code tag (look for the Lua icon in the editor).
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)
0
post your code inbwetween the codeblock (lua button) VerdommeMan 1479 — 4y

1 answer

Log in to vote
0
Answered by
LaysCo 61
4 years ago
Edited 4 years ago

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)
0
For Some Reason It Wouldn't play even with the avatar issue going on JerkDerekThe14alt 11 — 4y
Ad

Answer this question