So basically I'm doing a simple thing where when I land my torso onto the part it will play the audio, which the audio is located in the part called "Mat" Not sure If I'm doing things in reverse but please help anyone
local mat = workspace.Part
local debounce = false
local sc = workspace.mat
local hitm = sc.music
mat.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid")and debounce == true then
hitm:Play()
wait(.)
debounce = false
end
end)

2 comments
local mat = workspace.Part local debounce = false local sc = workspace.mat local hitm = sc.music mat.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid")and debounce == true then hitm:Play() wait(.) debounce = false end end)
whats you question?