|
| 27 Oct 2013 12:23 PM |
I have a ClickDetector button that when you click it, this happens: game.Workspace.Tube.Elevator.ElevatorPad.Pad.script = Enabled but in pairs. This is what I have, I don't know what else to do.
function OnClicked() for i,v in pairs(workspace:GetChildren()) do if v.Name == "Tube" then v.ElevatorPad.Pad.Move = Enabled end end
|
|
|
| Report Abuse |
|
|
| |
|
iConjurer
|
  |
| Joined: 25 Oct 2013 |
| Total Posts: 2320 |
|
|
| 27 Oct 2013 12:36 PM |
function OnClicked() for i,v in pairs(workspace:GetChildren()) do if v.Name == "Tube" then v.ElevatorPad.Pad.Move.Enabled = true --Fixed HERE end end
This post has been Lukeified! |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2013 12:41 PM |
| The last end is underlined in red. |
|
|
| Report Abuse |
|
|
VilleSlay
|
  |
| Joined: 14 May 2011 |
| Total Posts: 1405 |
|
|
| 27 Oct 2013 12:42 PM |
function OnClicked() for i,v in pairs(workspace:GetChildren()) do if v.Name == "Tube" then v.ElevatorPad.Pad.Move.Enabled = true end end end
~~> Ville <~~ |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2013 12:46 PM |
| It still doesn't work. Does the button have to be grouped with it or something? Right now each Tube is it's own model and the button is just a part in Workspace. |
|
|
| Report Abuse |
|
|
VilleSlay
|
  |
| Joined: 14 May 2011 |
| Total Posts: 1405 |
|
|
| 27 Oct 2013 12:50 PM |
function OnClicked() for i,v in pairs(workspace:GetChildren()) do if v.Name == "Tube" then v.Elevator.ElevatorPad.Pad.Move.Enabled = true --Added Elevator after "Tube" end end end
If this doesn't work you have probably forgotten to fire the event.
~~> Ville <~~ |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2013 12:51 PM |
| It still doesn't work. And what do you mean, how do I do that? |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2013 12:52 PM |
Is that the whole script? If so you need a connection line. |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2013 12:54 PM |
| script.Parent.ClickDetector.MouseClick:connect(OnClicked)? |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2013 12:56 PM |
| I added it to the end of the script but it didn't work. |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Oct 2013 01:05 PM |
Still don`t know what the 'ElevatorPad' is but i`ve been assuming it`s from the stamper tool. AmIRite? |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Oct 2013 01:08 PM |
The Elevator goes like this:
A Model named tube, with 5 models in it, 4 named Elevator, and 1 named ElevatorPad. In ElevatorPad, the part named Pad is in it. |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2013 01:10 PM |
Wait a minute... "Elevator.ElevatorPad.Pad.script = Enabled" Didn`t read that till now. See the problem? |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2013 01:11 PM |
| Ohh and it would be .Disabled = false |
|
|
| Report Abuse |
|
|
|
| 27 Oct 2013 01:13 PM |
| The Script inside the Pad is disabled. I want it to be Enabled when you click a button, but there are multiple Tubes, and I want them all to enable the script in Pad at the same time. |
|
|
| Report Abuse |
|
|
| |
|