#how can i make a horn button for a vehicle seat

1 messages · Page 1 of 1 (latest)

forest goblet
#

ive been trying at this for months, and came to the realization that im dumb, i mean im not living under a rock and know i am, but literally this should be so easy any ways i can do it?

gray stag
#

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

frank willow
#

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

mystic cypressBOT
#

studio** You are now Level 12! **studio

frank willow
#

i forgot

forest goblet
deft violet
#

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

gray stag
#

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.

frank willow
#

gui

forest goblet
frank willow
#

picture