Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do you make a model move negative on the y axis?

Asked by 6 years ago
Edited 6 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.

local inf = 99999999999999999999999999999999999999999999
script.Parent.Touched:connect(function(h)
    if (h.Parent.Name ~= "one" or "two" or "Three" or "Ocean" or "Dock") then
        script.Parent = game.ServerScriptService
        game.Workspace.Iceburg:Destroy()
        game.Workspace.Panic:Play()
        wait(60)
        game.Workspace.Ship.Motor.Disabled = true
        game.Workspace.Ship.Windows.Union.Transparency = 0
        game.Workspace.PowerDown:Play()
        wait(10)
        game.Workspace.Snap:Play()
        -- Here's the part that doesn't work.
        local velocity = Instance.new("BodyVelocity")
        velocity.Velocity = Vector3.new(0, -25, 0)
        velocity.Parent = game.Workspace.Ship.Prime
        velocity.P = 500
        velocity.MaxForce = Vector3.new(0, 100, 0)
        script:Destroy()
    end
end)

0
for line 16, "Prime" is the primary part of the model. LennonLight 95 — 6y

Answer this question