I wanted to make that when an object aka: Ball touches an specific part, then it will play the sound. But not when the player touches the Part but only the part.
local part = script.Parent
part.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChild("Humanoid") ~= nil then
local sound = script.Parent.Sound
if not sound.IsPlaying then
sound:Play()
end
end
end)

1 comment
In the future, please include the specific question you have in the question title.