Hi, I have a horn system i got working, but i can hear the horn everywhere in my game. And yes it is audible for other players. I have the horn in the workspace. In the ui there is a horn button where the car controls are, I have a script (in horn button) that has this
code: local horn = workspace.Horn–My horn name
script.Parent.MouseButton1Down:Connect(function()
horn:Play()
end)
I have tried setting a max distance in the horn sound and it does nothing.
This is the devforum post I used to get my horn audible: How to make this car horn audible to other players? - #15 by RMofSBI
Pictures of the explorer tab
If the Sound instance isn’t parented to a BasePart or an Attachment, it’s considered “global” and has the same volume everywhere in the game. You need to parent it to a part within the car for it to have the desired effect.
I put the horn in a part in the car as soon as i did that, the horn wouldn’t work. So changed the script. Instead of workspace I changed it to thepartname and still nothing i don’t think i did it right. What should I change in the script? Or placement of the part?
Hey You Need to change the Honda Van Name because it Beginns with a Number and you have an Underscore! You need to change the Van example „HondaVan“ and then it Should work!
Hi, your solution works, but it doesn’t work with my car spawner. How can I get the horn to work with my spawner? What is happening is the car spawner clones the car, but when i honk the horn in that car and someone else is using the same car the horn would only work in one of them.
So put an Script in the Vehicle in the Horn and use this Script down there!
Important is that you maybe should change the Parents because I don’t know how many Thinks are in the Group so just when It don’t work and gives an Error Than just remove an Parent or give an Parent
I tried it, it just kept under lining the whole thing red. I even added and got rid of the parents on that script. My car is in severstorage in a folder called ShopCars when I spawn it, it clones it to workspace, it works fine unless if there are 2 of the same car spawned in it would only work on 1 of them.
Remove the Horn1 and add the Parents and make an Point and do H and when it don’t Pop up the Horn1 then remove the H and add and Parent again till It pop ups
I created a script in horn sound that said script.Parent.Parent.Horn and it keeps underlining it. What I did first is script.Parent then i did h, nothing happened so i put parent again and then allowed me to put Horn1. Still won’t work for both Hondas’
Ohhhh my Bad you don’t wrote the Script fully so just set the Script in the Horn Part and try the Script again with the Parents and the Script should be the The same like this
local horn = script.Parent.Parent.Parent.HornPart.Horn1 — Check the Parents
script.Parent.MouseButton1Down:Connect(function()
horn:Play()
end)