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

How to make z axis only go back?

Asked by 8 years ago

So, I need help with this. I am making a wave, and I need the block to ONLY go backwards. With this code, the blocks expands frontwards and backwards. I need the block to only go backwards.

while 2==2 do -- Repeat 4ever
lws = {x = LowWater.Size.x, y = LowWater.Size.y, z = LowWater.Size.z} -- 3 variables
LowWater.Size = Vector3.new(lws.x, lws.y, lws.z+5) -- Increase size every 0.2 seconds
wait(0.2)
end

Thanks, and also the brick isn't that relevant, I just want to know how to limit the z axis to just backwards. If you paste that code, nothing will happen, but to make something happen, put this, just if you were curious.

LowWater = Instance.new("Part", workspace) -- Makes a new part in workspace
LowWater.Anchored=true -- Anchors the part
while 2==2 do -- Repeat 4ever
lws = {x = LowWater.Size.x, y = LowWater.Size.y, z = LowWater.Size.z} -- 3 variables
LowWater.Size = Vector3.new(lws.x, lws.y, lws.z+5) -- Increase size every 0.2 seconds
wait(0.2)
end
0
Edit: Added comments in case someone couldn't understand feeliirie 5 — 8y

Answer this question