#how can i make a horn button for a vehicle seat
1 messages · Page 1 of 1 (latest)
You can write a script that checks if a player is seated within the vehicle, create either a text or image button ui or connect a keybind input which represents the button for the horn and play a sound accordingly
uhm you mean like a physical button?
you can use surface gui or a part
with click detector
if you mean pressing a keybind
then use contextactionservice
you use CAS:BindAction("Honk", honkfunction, enum.keycode.E)
then unbind it when the character is no longer seated on the car
btw you can check for the humanoid state using humanoid.Statechanged or smtg
** You are now Level 12! **
i forgot
I meant a GUI in a seat
a local script that detects when a player sits in the vehicle seat which enables a UI button. clicking the button fires a remote event to the server telling a server script to play the horn
You can also write a script within the seat to fire a remote event that the player listens to which activates/deactivates a gui with a honk button.
a gui
picture