I am trying to play a sound whenever the bumper collides on something, but it doesn't seem to play when the car hits something when driving at a specific speed.
local part = script.Parent local seat = script.Parent.Parent.Parent.DriveSeat local s = script.Parent.Parent.Parent.DriveSeat.Hit if seat.Throttle >= 10 then local function onPartTouched(otherPart) print(part.Name .. " has touched " .. otherPart.Name) s:Play() end part.Touched:Connect(onPartTouched) end
I think you need to switch it around. Maybe this will work?
local part = script.Parent local seat = script.Parent.Parent.Parent.DriveSeat local s = script.Parent.Parent.Parent.DriveSeat.Hit local function onPartTouched(otherPart) if seat.Throttle == 1 then print(part.Name .. " has touched " .. otherPart.Name) s:Play() end end part.Touched:Connect(onPartTouched)