Recently, I took on the task of trying to make a realistic audio interaction system to give parts/models more life in ROBLOX and not sound so dead when they make contact with things. But a very frustrating bug as come up and I don’t know how to fix it.
Incase it wasn’t clear in the video, the audio plays and the touched print fires even though the object hasn’t moved? Why is this, and how can I work around this?
local soundservice = game:WaitForChild("SoundService"):WaitForChild("Audio_Interaciton")
script.Parent.Touched:Connect(function(hit)
if not hit.Parent:FindFirstChild("Humanoid") then
print('made contact!')
print(hit.Material)
if hit.Material == Enum.Material.Concrete then
local soundcopy = soundservice.ImpactWithWoodBounce:Clone()
soundcopy.Parent = script.Parent
soundcopy:Play()
wait(0.5)
soundcopy:Destroy()
end
end
end)
In the Output window whenever the player jumps the sound is played in Server - Script:7 or Server - Script:9. I realize those are the lines in your above script that are printing, but maybe try naming the script in each Part a different name so you can troubleshoot which one is causing the issue.
Normally when I see a print statement output it tells me where the script is located, not “Server”. Do you accidentally have one of these contact scripts in the workspace?