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("Torso") and debounce == false then hitm:Play() wait(.5) hitm.Ended:Wait() debounce = false end end)
So this is the code yes I have the audio inside of mat. Maybe I have to change some of the lines help anyone
Since Your "mat.Parent" = workspace do
local mat = workspace.Part local debounce = false local sc = workspace.mat local hitm = sc.music mat.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Torso") and debounce == false then hitm:Play() wait(.5) hitm.Ended:Wait() debounce = false end end)