Bryte
|
  |
| Joined: 27 Jun 2013 |
| Total Posts: 462 |
|
|
| 24 Jan 2014 03:32 PM |
I need a script where when you click a button a "part" goes up it altitude 25 studs just like a elevator |
|
|
| Report Abuse |
|
|
Bryte
|
  |
| Joined: 27 Jun 2013 |
| Total Posts: 462 |
|
| |
|
Bryte
|
  |
| Joined: 27 Jun 2013 |
| Total Posts: 462 |
|
| |
|
Bryte
|
  |
| Joined: 27 Jun 2013 |
| Total Posts: 462 |
|
| |
|
|
| 24 Jan 2014 04:01 PM |
http://www.roblox.com/Forum/ShowPost.aspx?PostID=80625843
#nerdsunited |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 24 Jan 2014 04:02 PM |
| What he is saying we dont make scripts. We fix broken code. Now go make it yourself. |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2014 04:17 PM |
I agree with King, and if you did not get the info you wanted from the forum post, here you are.
Put the script inside the part. Here -
script.Parent.Position = Vector3.new(0, 1, 0)
repeat script.Parent.Position = script.Parent.Position + Vector3.new(0, 1, 0) wait() until script.Parent.Position = Vector3.new(0, 25, 0)
There you go. I want to fix broken code like king said, not make the code and let you get it.. oh well, I guess you can learn from this. |
|
|
| Report Abuse |
|
|
|
| 24 Jan 2014 04:24 PM |
I meant to show you the click thing. Put a ClickDetector in the part.
Here you are!--
script.Parent.ClickDetector.onMouseClick:connect(function() script.Parent.Position = Vector3.new(0, 1, 0) repeat script.Parent.Position = script.Parent.Position + Vector3.new(0, 1, 0) until script.Parent.Position == Vector3.new(0, 25, 0) end) |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
| |
|
|
| 24 Jan 2014 04:26 PM |
| And one more thing, where it says onMouseClick should be onClicked. |
|
|
| Report Abuse |
|
|
kingmatt2
|
  |
| Joined: 20 Aug 2011 |
| Total Posts: 6494 |
|
|
| 24 Jan 2014 04:28 PM |
for i = 1,25 do script.Parent.CFrame = script.Parent.CFrame.new(0, 1, 0) end
Do that insted of repeat and Vector3. |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 24 Jan 2014 04:31 PM |
| No, it should be MouseClick |
|
|
| Report Abuse |
|
|