|
| 20 Jul 2016 06:35 PM |
Ok... I already have the siren ready! But when I click the lights button nothing happens! Im making it so the material will change to Neon because neon is bright and looks like a light! Here's My progress!
P.S. l1 means L one but i have it l1 :P
amb = game.Workspace.ambo
function onClicked() game.Workspace.ambo.l1.Material = Neon wait(1) game.Workspace.ambo.l1.Material = Plastic game.Workspace.ambo.l2.Material = Neon wait(1) game.Workspace.ambo.l2.Material = Plastic game.Workspace.ambo.l3.Material = Neon wait(1) game.Workspace.ambo.l3.Material = Plastic game.Workspace.ambo.l4.Material = Neon wait(1) game.Workspace.ambo.l4.Material = Plastic game.Workspace.ambo.l5.Material = Neon wait(1) game.Workspace.ambo.l5.Material = Plastic game.Workspace.ambo.l6.Material = Neon wait(1) game.Workspace.ambo.l6.Material = Plastic game.Workspace.ambo.l7.Material = Neon wait(1) game.Workspace.ambo.l7.Material = Plastic game.Workspace.ambo.l8.Material = Neon wait(1) game.Workspace.ambo.l8.Material = Plastic game.Workspace.ambo.l9.Material = Neon wait(1) game.Workspace.ambo.l9.Material = Plastic game.Workspace.ambo.l10.Material = Neon wait(1) game.Workspace.ambo.l10.Material = Plastic game.Workspace.ambo.l11.Material = Neon wait(1) game.Workspace.ambo.l11.Material = Plastic end
script.Parent.MouseButton1Click:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 06:42 PM |
| You have to put in a click detector |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 06:44 PM |
| I'm using a TextButton! I have the same function (function onClicked()) on the other script(Siren) and it works |
|
|
| Report Abuse |
|
|
ImDgilly
|
  |
| Joined: 23 Oct 2010 |
| Total Posts: 76 |
|
|
| 20 Jul 2016 06:45 PM |
Yeah, MouseButton1Click is not a valid event of a part. You need a mouseclickdetector. |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 06:47 PM |
| The button where you click to turn the lights on is in starterGui... I'm not clicking a physical part.. |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 06:47 PM |
function onClicked()
for i = 1,10 1 do
game.Workspace.ambop["l"..i].Material = Plastic game.Workspace.ambop["l"..i+1].Material = Plastic wait(1) end end script.Parent.MouseButton1Click:connect(onClicked)
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 06:48 PM |
| each part l1,l2,l3 ect is a light. I want it so when you click it they flash |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 06:50 PM |
function onClicked()
for i = 1,10 1 do <--- Error at the last one before do...
game.Workspace.ambop["l"..i].Material = Plastic <--- and whats ambop? game.Workspace.ambop["l"..i+1].Material = Plastic wait(1) end end script.Parent.MouseButton1Click:connect(onClicked) |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 06:51 PM |
forgot a comma after the 10
fml
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 06:53 PM |
Dgilly, so we meet again. That dumb kid from v3rm hating on my stuff. Just remember, I got dat underground army and I holdin down.
#code print("While I may look like a cataclysmic god of the eggs from the future, I am not.") |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 20 Jul 2016 06:54 PM |
should be 1, 10, 1 do
he misread your original post and wrote ambop instead of ambo, you could easily deduce that |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 06:55 PM |
well, at least it will take 2 sec to edit instead of taking 20000000 lines of editing
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 06:56 PM |
| I figured the ambo part out. but i don't see anything changing to Neon |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 06:58 PM |
function onClicked()
for i = 1,10,1 do
game.Workspace.ambo["l"..i].Material = Enum.Material.Neon game.Workspace.ambo["l"..i+1].Material = Enum.Material.Plastic wait(1) end end script.Parent.MouseButton1Click:connect(onClicked)
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 06:59 PM |
| Ok. so i the lights are starting but when they all light up they stay lit up. I need them flashing! We're getting somewhere now :P |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 20 Jul 2016 07:00 PM |
| that's not exactly the same as his script. |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 07:01 PM |
well this got a bit complicated
local alternate = true unction onClicked()
for i = 1,10,1 do
if alternate then game.Workspace.ambo["l"..i].Material = Enum.Material.Neon game.Workspace.ambo["l"..i+1].Material = Enum.Material.Plastic alternate = false else game.Workspace.ambo["l"..i].Material = Enum.Material.Plastic game.Workspace.ambo["l"..i+1].Material = Enum.Material.Neon alternate = true wait(1) end end end script.Parent.MouseButton1Click:connect(onClicked)
Add 13,000 posts |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 07:03 PM |
"unction"
how does this even happen lol
Add 13,000 posts |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 20 Jul 2016 07:03 PM |
| At the start it makes l1 neon then waits 1 second and at the end it makes l11 plastic i believe. |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 07:05 PM |
| DANGIT!!!! NOW ONLY SOME OF THEM LIGHT UP!!! R.I.P AMBO! |
|
|
| Report Abuse |
|
|
| |
|
|
| 20 Jul 2016 07:09 PM |
| Lol Bye Bye! Guess some ambos dont gave lights... |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 07:14 PM |
| Somehow we gotta get dem lights to shut off when there lit! SMH |
|
|
| Report Abuse |
|
|
|
| 20 Jul 2016 07:17 PM |
| what about math.ramdom? so each one will come on randomly until you click the off button? |
|
|
| Report Abuse |
|
|
kools
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 1659 |
|
|
| 20 Jul 2016 07:20 PM |
I really want to help you, but first you have to help me understand what exactly the end behaviour is too look like.
Will all the lights alternate at the same time? Will it be half and half? Is only on light being turned on and off at a time like in your original script? And for how long? How many cycles do you want it to go through?
Thanks. |
|
|
| Report Abuse |
|
|