#stage lights, something i tried for months but always failed

95 messages · Page 1 of 1 (latest)

burnt minnow
#

so like i tried to make these stage lights, if you press like a green button the lights will turn on green, i dont want anything too fancy just something really basic, i need this system done for my game before christmas, let me send some photos for what im trying to make. if anyone could help me make these, or even make them with me on studio id appreciate it 😉

#

if anyone knows how to make, message here or dm me 🙏

wooden owl
burnt minnow
wooden owl
#

do you already got the basic lights made in studio

burnt minnow
burnt minnow
wooden owl
# burnt minnow im very stuck so i didnt get so far 😭

well assuming just for right now that youve got a light made, what i feel would be the best option is a row of parts with ClickDetectors inside of them, then within a script whenever each is pressed it'll change the Color property of all the lights to the clicked parts color

burnt minnow
#

yea, i got the lights, buttons and scripts but i havent filled any code in yet, could you possibly help me make a code for this?

#

i have made some partical admitting light things but what im tryna do here is more different

wooden owl
# burnt minnow yea, i got the lights, buttons and scripts but i havent filled any code in yet, ...

okay well assuming your lights are all exactly the same and put into the same container it'd be something like

local LightsContainer = game.Workspace.Lights -- folder containing light parts
local ButtonsContainer = game.Workspace.Buttons -- assume this is a folder or something containing parts

local function OnClick(ClickedPart:Part)
  local AllLights = LightContainer:GetChildren()
  for _,v in AllLights do
    print("Changed",v.Name,"'s color to",ClickedPart.Name,"'s color")
    v.Color = ClickedPart.Color
  end
end

for _,v in ButtonsContainer:GetChildren() do
  print("adding",v.Name)
  local ClickDetector = v:FindFirstChild("ClickDetector") or Instance.new("ClickDetector",v)
  ClickDetector.MouseClick:Connect(function()
    print(v.Name,"clicked")
    OnClick(v)
  end)
end
#

not on pc rn so this probably wont work

burnt minnow
#

shall i group the lights to the button?

wooden owl
#

no, youd want the lights in something like a folder

#

same with the buttons

#

for this im assuming both the lights and the buttons are Parts

lapis talon
burnt minnow
#

yea they are parts rn

wooden owl
#

the code should automatically create the clickdetectors

wooden owl
#

i usually just browse randomly for stuff

burnt minnow
#

alright thank you, ill try do that code rq

clever rapidsBOT
#

studio** You are now Level 2! **studio

wooden owl
lapis talon
wooden owl
#

alr

#

ill check it out rn

burnt minnow
#

uh lemme fix that

#

nope it does not work

#

im gonna use more basic things, for now i just need this pink button to make the sphere neon pink when i press the button if ur still free on helping

wooden owl
burnt minnow
#

please if ur able to im gonna slowly decay making these

burnt minnow
#

i restarted again on a fresh studio now so everything is new and clean

wooden owl
#

it creates a clickdetector inside the buttons right?

burnt minnow
#

yea i did that

wooden owl
#

i mean the way that this works is it automatically creates it

#

let me add some prints and lmk

burnt minnow
#

alright, im gonna try a similar method if someone is free to help me continue this version

wooden owl
#

i edited the script

wooden owl
burnt minnow
#

alr

wooden owl
#

the script i sent should be inside of serverscriptservice

wooden owl
burnt minnow
#

uhh

#

i can try again rq

wooden owl
#

a folder names Buttons, and a folder names Lights

burnt minnow
#

do i press "group as a folder" ?

#

for lights

#

and buttons

#

or 1

wooden owl
#

so yeah

#

for each "button" part make sure its in a folder named Buttons
and for each "light" part make sure its in a folder named Lights

burnt minnow
#

like this?

wooden owl
#

yeah

#

now try

wooden owl
burnt minnow
#

omg it worked

#

TYSM

wooden owl
#

np

#

if you wanted to add actual light instances itd be similar just change those colors to the part color

burnt minnow
#

this is so cool and yes i will if i needed to in future, thanks so so much!!

clever rapidsBOT
#

studio** You are now Level 3! **studio

wooden owl
#

np

burnt minnow
#

by chance, how could i make the buttons a gui? srry im asking alot

#

so i dont have like 40 buttons everywhere

wooden owl
#

since you want the light colors to be replicated

burnt minnow
#

could you explain a bit more?

wooden owl
#

it runs a function through with the given arguments

#

so if i fired a remote event via

RemoteEvent:FireServer(Color3.fromRGB(255,0,0))

then the server can do

RemoteEvent.OnServerEvent:Connect(function(Player,GivenColor)
  print(GivenColor)
end
#

Player is automatically given

#

and this would print out the color thing for red i think

burnt minnow
#

hmm

#

ill give that a go

#

ty!

wooden owl
#

np

burnt minnow
#

uh

#

smth broke

#

the light is now clickable and not the button and when i click it, it makes the nearby pool like controls go that colour

#

help 😭

burnt minnow
#

nope

#

i redid the process to make them in a different game

#

now they are uh

#

broken...

wooden owl
#

its something with the naming then

#

since if theyre reversed then how one part should function switched over

burnt minnow
#

oh yep found it]