I want to make a turn signals to put into my A-Chassis v.AC6C, like some of my other posts, it doesn’t work. I use a RemoteEvent and 3 scripts from a YouTube tutorial I found. Obviously, it didn’t help. Here is the information:
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.Z then
script.Parent:WaitForChild("Left"):FireServer()
elseif input.KeyCode == Enum.KeyCode.C then
script.Parent:WaitForChild("Right"):FireServer()
end
end)
A script inside a RemoteEvent named ‘right’.
script.Parent.OnServerEvent:Connect(function()
script.Parent.Parent.Parent.Parent.Body.Body["Car Model"].Blinkers.Li.Light = not script.Parent.Parent.Parent.Parent.Body.Body["Car Model"].Blinkers.Li.Light
end)
A script inside the blinker model:
while true do
wait()
if script.Parent.Parent.Light.Value == true then
script.Parent.Material = "Neon"
else
script.Parent.Material = "Neon"
end
end
This is for the right blinker, it’s pretty much copy-and-paste for the right one.
Thanks, @vxcaie, a programmer/scripter in the ROBLOX community.
Try using a few variables that actually wait for stuff to exist before trying to reference them.
local parent = script.Parent
local mainModel = parent.Parent.Parent
local body = mainModel:WaitForChild('Body')
local subBody = body:WaitForChild('Body')
local carModel = subBody:WaitForChild('Car Model')
local blinkers = carModel:WaitForChild('Blinkers')
local li = blinkers:WaitForChild('Li')
local lights = li:WaitForChild('Lights')
I wasn’t saying to just blindly cut and paste my variables into your script, you have to label the WaitForChilds properly for the paths they’re in. Accurate names, locations, and all that jazz
The lights turn on (SmoothPlastic is regular) but I have no control over them.
script.Parent.OnServerEvent:Connect(function()
local parent = script.Parent
local mainModel = parent.Parent.Parent
local body = mainModel:WaitForChild('Body')
local subBody = body:WaitForChild('Body')
local carModel = subBody:WaitForChild('Car Model')
local blinkers = carModel:WaitForChild('Blinkers')
local li = blinkers:WaitForChild('Li')
local lights = li:WaitForChild('Light')
lights.Value = not lights.Value
end)
while true do
wait()
script.Parent.Parent.Light.Value = true
if script.Parent.Parent.Light.Value == true then
script.Parent.Material = Enum.Material.Neon
script.Parent.Parent.Light.Value = false
wait(2)
elseif script.Parent.Parent.Light.Value == false then
script.Parent.Material = Enum.Material.SmoothPlastic
end
end