How do you make a model move negative on the y axis?
Asked by
7 years ago Edited 7 years ago
*I am working on a ship sinking script, Every thing works except the sinking part of it..
I'm trying to make the ship go down on the y axis. which is negative.
I was thinking to add body velocity but it isn't working. Could someone tell me why??*
By the way, The ship is a MODEL, Not a Union
The script goes inside of an "iceberg" I guess you could say. When the ship hits it, The script automatically changes its' parent to server script service so the boat can only touch it once.
01 | local inf = 99999999999999999999999999999999999999999999 |
02 | script.Parent.Touched:connect( function (h) |
03 | if (h.Parent.Name ~ = "one" or "two" or "Three" or "Ocean" or "Dock" ) then |
04 | script.Parent = game.ServerScriptService |
05 | game.Workspace.Iceburg:Destroy() |
06 | game.Workspace.Panic:Play() |
08 | game.Workspace.Ship.Motor.Disabled = true |
09 | game.Workspace.Ship.Windows.Union.Transparency = 0 |
10 | game.Workspace.PowerDown:Play() |
12 | game.Workspace.Snap:Play() |
14 | local velocity = Instance.new( "BodyVelocity" ) |
15 | velocity.Velocity = Vector 3. new( 0 , - 25 , 0 ) |
16 | velocity.Parent = game.Workspace.Ship.Prime |
18 | velocity.MaxForce = Vector 3. new( 0 , 100 , 0 ) |