nvm I fixed it buy only adding one thing Hello, I have a rc car ai that senses if it touches something. If it touches something it plays a hit sound. But It doesn't want to work. I get the error Unable to cast string to bool. Can anybody help?
--Play sound script
local debounce = false
script.Parent.Touched:connect(function(hit)
if not debounce then
debounce = true
if(hit.Parent:FindFirstChild("MeshPart","Part","UnionOperation","WedgePart")~=nil)then
local sound = script.Parent.Hit --Removed space before end quotation mark
sound:Play()
wait(1.6)
end
debounce = false
end
end)

4 comments
This my answer
This my answer
This my answer
what?