generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Why doesn't this work?

Previous Thread :: Next Thread 
WoodBlocks18 is not online. WoodBlocks18
Joined: 29 May 2010
Total Posts: 382
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
WoodBlocks18 is not online. WoodBlocks18
Joined: 29 May 2010
Total Posts: 382
27 Oct 2013 12:29 PM
Please help.
Report Abuse
iConjurer is not online. 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
WoodBlocks18 is not online. WoodBlocks18
Joined: 29 May 2010
Total Posts: 382
27 Oct 2013 12:41 PM
The last end is underlined in red.
Report Abuse
VilleSlay is not online. 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
WoodBlocks18 is not online. WoodBlocks18
Joined: 29 May 2010
Total Posts: 382
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 is not online. 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
WoodBlocks18 is not online. WoodBlocks18
Joined: 29 May 2010
Total Posts: 382
27 Oct 2013 12:51 PM
It still doesn't work. And what do you mean, how do I do that?
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
27 Oct 2013 12:52 PM
Is that the whole script?
If so you need a connection line.
Report Abuse
WoodBlocks18 is not online. WoodBlocks18
Joined: 29 May 2010
Total Posts: 382
27 Oct 2013 12:54 PM
script.Parent.ClickDetector.MouseClick:connect(OnClicked)?
Report Abuse
WoodBlocks18 is not online. WoodBlocks18
Joined: 29 May 2010
Total Posts: 382
27 Oct 2013 12:56 PM
I added it to the end of the script but it didn't work.
Report Abuse
WoodBlocks18 is not online. WoodBlocks18
Joined: 29 May 2010
Total Posts: 382
27 Oct 2013 01:04 PM
..Please help
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
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
WoodBlocks18 is not online. WoodBlocks18
Joined: 29 May 2010
Total Posts: 382
27 Oct 2013 01:06 PM
No. I made it.
Report Abuse
WoodBlocks18 is not online. WoodBlocks18
Joined: 29 May 2010
Total Posts: 382
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
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
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
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
27 Oct 2013 01:11 PM
Ohh and it would be .Disabled = false
Report Abuse
WoodBlocks18 is not online. WoodBlocks18
Joined: 29 May 2010
Total Posts: 382
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
WoodBlocks18 is not online. WoodBlocks18
Joined: 29 May 2010
Total Posts: 382
27 Oct 2013 01:16 PM
Thanks, it worked!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image