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).
01local sc = workspace.Part
02    local debounce = false
03    local hitm = sc.music
04    sc.Touched:Connect(function(hit)
05        if hit.Parent:FindFirstChild("Torso") and debounce == false then
06        debounce = true
07        hitm:Play()
08            wait(.5)
09        hitm.Ended:Wait()
10            debounce = false
11        end
12    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

01local sc = game.Workspace.Part
02local debounce = false
03local hitm = sc.music
04 
05sc.Touched:Connect(function(hit)
06    if hit.Parent:FindFirstChild("UpperTorso") and debounce == false then
07        debounce = true
08            hitm:Play()
09            wait(.5)
10            hitm.Ended:Wait()
11        debounce = false
12    end
13end)
0
For Some Reason It Wouldn't play even with the avatar issue going on JerkDerekThe14alt 11 — 4y
Ad

Answer this question