Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I make a Police GUI for my own Lightbar?

I'm creating a police car for my own, I created the light and I scripted them flashing but I don't know how to make a GUI that appears when a humanoid sits on the driver sit, that can control lights and siren. Please Help!

2 comments

0

GUI* instead of guy in the title, sorry about that.

0

you can edit the question as much as you like. Please follow https://scriptinghelpers.org/help/how-post-good-questions-answers

1 answer

You can do this using Seat.Occupant (or VehicleSeat.Occupant)

local Seat = script.Parent.DriverSeat
Seat:GetPropertyChangedSignal("Occupant"):Connect(function()
	local Driver = game:GetService("Players"):GetPlayerFromCharacter(Seat.Occupant.Parent)
	--The Driver is the player in the Seat
	--Put here the code you want :)
end)

Seat.Occupant returns the Driver's Humanoid

1 comment

0

Thank you!

This discussion is preserved as it was. New answers, comments, and votes are closed.