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: Elevator?

Previous Thread :: Next Thread 
piroulineisback is not online. piroulineisback
Joined: 02 Feb 2013
Total Posts: 1333
20 Mar 2013 02:35 PM
Can someone teach me how to make an elevator with numbers so you press the numbers and it goes to the floor?
Report Abuse
pokemon771 is not online. pokemon771
Joined: 28 Oct 2008
Total Posts: 8671
20 Mar 2013 02:37 PM
YA TAKE DA HAND DEN U TAKE DA KEYBOARD AND U SLAP DA HAND ON THE KEYBORD UNTILL SOMETHING HAPPENS
IF ALL ELSE FALS DEN U TAKE DA HAND AND SLAP URSHELF SHILLE
Report Abuse
piroulineisback is not online. piroulineisback
Joined: 02 Feb 2013
Total Posts: 1333
20 Mar 2013 02:40 PM
troll -_-
Report Abuse
6dawg34 is not online. 6dawg34
Joined: 31 Aug 2011
Total Posts: 305
20 Mar 2013 02:49 PM
@pokemon771 LOL.
Report Abuse
piroulineisback is not online. piroulineisback
Joined: 02 Feb 2013
Total Posts: 1333
20 Mar 2013 02:50 PM
Now can someone really help me?
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
20 Mar 2013 02:52 PM
You do it by:

Learning how to script. And learning how to use BodyForce etc. And learning how you have to post attempts before asking for help (most of the time). And by giving more detail.
Report Abuse
piroulineisback is not online. piroulineisback
Joined: 02 Feb 2013
Total Posts: 1333
20 Mar 2013 02:54 PM
I do know simple scirpts buts its hard to learn it when the wiki is out of date
Report Abuse
digpoe is not online. digpoe
Joined: 02 Nov 2008
Total Posts: 9092
20 Mar 2013 02:56 PM
The wiki isn't that much out of date. I still use it here and there.
Report Abuse
piroulineisback is not online. piroulineisback
Joined: 02 Feb 2013
Total Posts: 1333
20 Mar 2013 02:59 PM
Ill just look at free models and leasn form them thats how crazyman32 learned :D
Report Abuse
MassiveGman is not online. MassiveGman
Joined: 23 Jan 2011
Total Posts: 2019
20 Mar 2013 03:11 PM
The wiki is not out of date.
It is constantly updated.
It may have minuscule errors, but if those are brought to attention they are corrected.
Stop complaining, the wiki is a great resource, but you are disappointed because it doesn't just GIVE you the answer.



|-MassiveGman-| ~|Law Of Inertia|~
Report Abuse
piroulineisback is not online. piroulineisback
Joined: 02 Feb 2013
Total Posts: 1333
20 Mar 2013 03:14 PM
I wasent looking for anyone to just give me the scirpt i was looking for someone to break it now and tell me what does what and how it works
Report Abuse
stephen1182 is not online. stephen1182
Joined: 31 Aug 2010
Total Posts: 4003
20 Mar 2013 03:36 PM
function onClicked(mouse)
game.Workspace.elevatorbase.Position = Vector3.new(?,+0.1,?)
wait()
game.Workspace.elevatorbase.Position = Vector3.new(?,+0.1,?)
wait()
game.Workspace.elevatorbase.Position = Vector3.new(?,+0.1,?)
wait()
game.Workspace.elevatorbase.Position = Vector3.new(?,+0.1,?)
wait()
--However far up you want it to go.
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)
Report Abuse
piroulineisback is not online. piroulineisback
Joined: 02 Feb 2013
Total Posts: 1333
20 Mar 2013 03:53 PM
Thanks for explaining what it does -_-
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
20 Mar 2013 04:06 PM
You'd have the elevator have a body positon, because that would be the best to use for an elevator, imo, and have a script like this in EACH button. You'd need a IntValue in the elevator as well, as you will see.


el = path.to.elevator
b = elevator.BodyPostion
moving = elevator.Moving.Value --IntValue that changes if the elevator is moving

floor = 100 -- Y value of the floor. Unique on each button

function move()

if moving == false then
moving = true
local dest = Vector3.new(e.Position.X, floor, e.Position.Z)
b.Position = dest
repeat wait() until math.abs(e.Position.Y - dest.Y) <= 2
moving = false
end

end

script.Parent.ClickDetector.MouseClick:connect(move)

Don't really have time to explain, but that's the jist of it.
Report Abuse
piroulineisback is not online. piroulineisback
Joined: 02 Feb 2013
Total Posts: 1333
20 Mar 2013 04:57 PM
Would i repeat make the script for every button?
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
21 Mar 2013 06:21 AM
I've got a better idea

floor1 = 10
floor2 = 60
floor3 = 110
etc..

function move(y)

if moving == false then
moving = true
local dest = Vector3.new(e.Position.X, y, e.Position.Z)
b.Position = dest
repeat wait() until math.abs(e.Position.Y - dest.Y) <= 2
moving = false
end

end

elevator.Button1.ClickDetector.MouseClick:connect(function() move(floor1) end)
elevator.Button2.ClickDetector.MouseClick:connect(function() move(floor2) end)
elevator.Button3.ClickDetector.MouseClick:connect(function() move(floor3) end)
etc..

That way it would be in one script, instead of many.
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