01 | local 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 ) |
Make sure you are using r6 avatar and not r15. r15 has UpperTorso and LowerTorso. r6 has Torso. Hope this solves your problem
01 | local sc = game.Workspace.Part |
02 | local debounce = false |
03 | local hitm = sc.music |
04 |
05 | sc.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 |
13 | end ) |