script.Parent.MouseButton1Click:connect(function()
print("Light on Clicked")
script.Parent.Parent.Parent.Parent.Parent.Beacon.Mechanism.Light.Material = Enum.Material.Neon
script.Parent.Parent.Parent.Parent.Parent.Beacon.Mechanism.Light.SpotLight.Enabled = true
script.Parent.Parent.Parent.Parent.Parent.Beacon.Mechanism.MotorPart.BottomSurfaceInput = "Constant"
print("Light in action")
end)
The GUI is in a vehicleseat. I have figured out how to make it open on seat, but what I want this to do is when this GUI button is pressed, that it makes the beacon's light material neon, and enables spotlight inside it, and makes the bottomsurfaceinput turn into Constant, so that it spins (yes I use old motor constraints). When i press it in play mode, the output says that beacon is not a valid member of players. Can you fix this for me please? It's all grouped.

5 comments
This code is giving me a headache.
It looks like that, but the code block's size puts some lines below.
Ultimate parentception
Yes, I just didn't feel like shortening it by adding something like this Beacon = script.Parent.Parent.Parent and etc
You're trying to find the beacon in Players instead of Workspace