If I 'elaborated on my question' my title would be way too long.
Basically, this scriptinghelpers post tells me that, in order to make car headlights, I must place a RemoteEvent inside the car, a LocalScript in an unspecificed location, and a script inside the car. I've put the LocalScript in the RemoteEvent. It needs to be somewhere in the car because the car is referred to as 'script.Parent.Parent' several times. I can't say 'game.Workspace...' because, should my game get any traction, there will be several people driving the same type of car. RemoteEvents require LocalScripts, don't they? LocalScripts must be in a player to work, right? So, how can I have a RemoteEvent connected to a local script which is inside a car? If that isn't possible, how can I have a RemoteEvent perform its function with a script that is inside of a car? How can I make car headlights with FE?
Here are the scripts, if you need them:
local player = game:GetService("Players").LocalPlayer local HondaAccordWagon = script.Parent.Parent.Parent.Parent local Headlights = script.Parent.Parent.Headlight1 local UIS = game:GetService("UserInputService") UIS.InputBegan:Connect(function(inputObject) if inputObject.KeyCode == Enum.Keycode.L then Headlights.HeadlightLight1.Enabled = not Headlights.HeadlightLight1.Enabled Headlights.Headlight2.HeadlightLight2.Enabled = not Headlights.Headlight2.HeadlightLight2.Enabled script.Parent:FireServer() end end)
local HondaAccordWagon = script.Parent.Parent local headlights = false HondaAccordWagon.RemoteEvent.OnServerEvent:Connect(function(player) HondaAccordWagon.RemoteEvent.OnServerEvent:Connect(function(player) headlights = not headlights if headlights then script.Parent.HeadlightLight1.Enabled = true script.Parent.Headlight2.HeadlightLight2.Enabled = true else script.Parent.Headlight2.HeadlightLight2.Enabled = false script.Parent.HeadlightLight1.Enabled = false end end)
Yes, I stole the scripts from the aforementioned scriptinghelpers post. Do I feel bad at all? Nope.