Rotation for mesh

SpeedBoat.PNG
How can i create a script that rotates the boat constantly (so it looks like its moving in the water). Please give me an example as this is my first time making a script with mesh rotation variable.
Thanks! : )
-Fastthedev

Have you tried the animation system? (It might work) :confused:

1 Like
local boat = script.Parent --Cuz you put script into boat mesh
local tme = 1 --With what time it will tilt

local angle1 = Vector3.new(5,0,5) 
-- /\
-- You can set numbers and check how the boat will move, just make urs one, i made example.
-- \/
local angle2 = Vector3.new(-5,0,-5)

local tweens = game:GetService("TweenService") --Smooth moving thing

while true do
	tweens:Create(boat, TweenInfo(tme, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {Orientation = angle1}):Play()
	task.wait(tme)
	tweens:Create(boat, TweenInfo(tme, Enum.EasingStyle.Cubic, Enum.EasingDirection.InOut), {Orientation = angle2}):Play()
	task.wait(tme)
end
1 Like

dang, I wish it was possible to select 2 solutions.

1 Like