somemanJoin Date: 2008-03-10 Post Count: 1402 |
So... You guys help me make a rocket that goes up. But now I would like a script to get the Velocity and Position of the Y variables... and change the name of a model into the Height/Speed. I would like two scripts. But if you want, you can put them together. I tried this, but I have no idea on what to do...
------------------
P.Y = game.Workspace.Fuselage.Position.Y
while true do
wait(2.5)
game.Workspace.CompletePanel.Altitude.Name = #P.Y "Studs"
end
|
|
oysi93Join Date: 2008-04-27 Post Count: 12469 |
I recommend you to learn about variables, properties, and vectors. =)
local Obj = Worksapce.Fuselage
while true do wait(2.5)
local Altitude = math.floor(Obj.Position.Y + 0.5) .. " Studs"
local Velocity = math.floor(Obj.Velocity.magnitude + 0.5) .. " Studs/Sec"
-- Do st00fz with those variables --
end |
|
somemanJoin Date: 2008-03-10 Post Count: 1402 |
I know right. >_>
I always seem to forget the Vector3.new's.
I could work on variables.
I know a bit about properties, just get occasional errors.
Thanks again anyways. |
|
somemanJoin Date: 2008-03-10 Post Count: 1402 |
And this script goes in Workspace... Correct? |
|
oysi93Join Date: 2008-04-27 Post Count: 12469 |
Pretty much anywhere it will run. =P
Though that won't do anything as of yet,
you need to output it in some way.
And the way you did it before wouldnt't work,
hence I recommended you to learn more about properties. |
|
somemanJoin Date: 2008-03-10 Post Count: 1402 |
Now... Um, how do I get it to update itself since it changes the name? |
|
oysi93Join Date: 2008-04-27 Post Count: 12469 |
If you've read the very basics in the wiki, or learnt it in another way,
you'd know this.
So please, go learn how to script before you try doin' it. =) |
|
somemanJoin Date: 2008-03-10 Post Count: 1402 |
Yeah I'm too lazy to do that right now... But how do I know if the name changes?
game.Workspace.CompletePanel.altitude.Name = "Altitude"
:o |
|
somemanJoin Date: 2008-03-10 Post Count: 1402 |
Nope... Help me, please? |
|
somemanJoin Date: 2008-03-10 Post Count: 1402 |
Oysi... :(
Trappingnoobs... :(
Where are you guys?!? D: |
|
CombradJoin Date: 2009-07-18 Post Count: 11025 |
Brick = LOCATE YOUR BRICK
TextA = Where the altitude will go
TextB = Where the speed will go
for i = 1,#math.huge do
Altitude = math.floor(Brick.Position.Y + 0.5)
Speed = math.floor(Brick.Velocity.magnitude + 0.5)
TextA.Text = "Height : "..Altitude
TextB.Text = "Speed : "..Speed
wait(1)
end |
|
somemanJoin Date: 2008-03-10 Post Count: 1402 |
But its going on a brick. So will it work? It isnt going in a message or hint. |
|
Gojira34Join Date: 2009-12-28 Post Count: 1040 |
Brick = LOCATE YOUR BRICK
TextA = Where the altitude will go
TextB = Where the speed will go
while true do
wait(1)
Altitude = math.floor(Brick.Position.Y + 0.5)
Speed = math.floor(Brick.Velocity.magnitude + 0.5)
TextA.Name = "Height : "..Altitude
TextB.Name = "Speed : "..Speed
end |
|
oysi93Join Date: 2008-04-27 Post Count: 12469 |
Read my post again, please. =) |
|