Moving Parts

Reminder: local module = require(workspace.MainScripts.ModuleScript) must be at the top.

Recommended method: MovePart (at the bottom of this page).

MoveWater (Deprecated)
The first thing you see in MapScript is

local module = require(workspace.MainScripts.ModuleScript) and a bunch of comments.

The script is disabled until the round starts or when the players can start moving. So let's say you want to make water move up 20 Studs in 2 Seconds after 4 Seconds. Example:

OverflowMapKit

MapScript

MapWater

Water1

You'll put a "wait(4)" in the script first:

That'll make the script wait 4 seconds, or something like that. After the 4 seconds, you want the water to move 20 Studs in 2 Seconds.

If you have read the script, you'll see: water is the Part, duration is a Number, position is.. a Vector3 thing...

For some reason, 30 in duration is equal to 1 second, I don't know why but blame veryfakeguest.

You want the move the Water1 in the MapWater, so you'll do: What this does it moves the part up by 5 studs in 1 second, but that's not what we wanted so we'll just change things.

In the script, we should have this: local module = require(workspace.MainScripts.ModuleScript)

wait(4)

-- The part will take 2 Seconds to move up by 20 Studs

module.MoveWater(script.Parent.MapWater.Water1, 2 * 30, script.Parent.MapWater.Water1.Position + Vector3.new(0,20,0))

EaseWater (Deprecated)
To tween a part, you just have to put in Map script this: water -- the part you want to move position -- the position you want to part to move to duration -- the time taken to move to position (Default if empty: 0) style -- the easing style (Default if empty: Linear) direction -- the easing direction (Default if empty: InOut) repeats -- the amount of time the tween will repeat (Default if empty: 0) (If set to -1, it will be repeating forever.) reverse -- the tween will reverse if true (Default if empty: false) delay_time -- who uses this (Default if empty: 0) This is smoother than  so it is recommended to use this instead.

You can check out these pages to check out the different easing styles and directions:

https://developer.roblox.com/api-reference/enum/EasingStyle

https://developer.roblox.com/api-reference/enum/EasingDirection local module = require(workspace.MainScripts.ModuleScript) wait(4) module.EaseWater(script.Parent.MapWater.Water1, script.Parent.MapWater.Water1.Position + Vector3.new(0,20,0), 2)

-- instead of using module.MoveWater(script.Parent.MapWater.Water1, 2 * 30,

script.Parent.MapWater.Water1.Position + Vector3.new(0,20,0)) module.ChangeWaterState(script.Parent.MapWater.Water1, 2, false) As you can see it is much more efficient (Duration can be 2 instead of 30 * 2) and you can get much more creative with it.

MovePart
Similar to EaseWater: but is made to be much simpler to use.

Instead of having to do: script.Parent.MapWater.Water1.Position + Vector3.new(0, 20, 0), you can instead do Vector3.new(0, 20, 0).

Example: module.EaseWater(script.Parent.MapWater.Water1, script.Parent.MapWater.Water1.Position + Vector3.new(0,20,0), 2)

module.MovePart(script.Parent.MapWater.Water1, Vector3.new(0,20,0), 2)