You can write your topic however you want, but you need to answer these questions:
- What do you want to achieve?
I want achieve a smooth loop for a boat in my game.
2. What is the issue?
The issue is when it turns its not that smooth.
- What solutions have you tried so far?
Finding a solution
local boat = script.Parent
local boat1 = script.Parent.Parent:WaitForChild("Boat1")
local boat2 = script.Parent.Parent:WaitForChild("Boat2")
local boat3 = script.Parent.Parent:WaitForChild("Boat3")
local boat4 = script.Parent.Parent:WaitForChild("Boat4")
local boat5 = script.Parent.Parent:WaitForChild("Boat5")
local boat6 = script.Parent.Parent:WaitForChild("Boat6")
local boat7 = script.Parent.Parent:WaitForChild("Boat7")
local boat8 = script.Parent.Parent:WaitForChild("Boat8")
local tweenservice = game:GetService("TweenService")
local tweeninfo = TweenInfo.new(
12,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In
)
local tween1 = {CFrame = boat1.CFrame}
local tween2 = {CFrame = boat2.CFrame}
local tween3 = {CFrame = boat3.CFrame}
local tween4 = {CFrame = boat4.CFrame}
local tween5 = {CFrame = boat5.CFrame}
local tween6 = {CFrame = boat6.CFrame}
local tween7 = {CFrame = boat7.CFrame}
local tween8 = {CFrame = boat8.CFrame}
local tween1boat = tweenservice:Create(boat,tweeninfo,tween1)
local tween2boat = tweenservice:Create(boat,tweeninfo,tween2)
local tween3boat = tweenservice:Create(boat,tweeninfo,tween3)
local tween4boat = tweenservice:Create(boat,tweeninfo,tween4)
local tween5boat = tweenservice:Create(boat,tweeninfo,tween5)
local tween6boat = tweenservice:Create(boat,tweeninfo,tween6)
local tween7boat = tweenservice:Create(boat,tweeninfo,tween7)
local tween8boat = tweenservice:Create(boat,tweeninfo,tween8)
while true do
wait(12)
tween1boat:Play()
wait(12)
tween2boat:Play()
wait(12)
tween3boat:Play()
wait(12)
tween4boat:Play()
wait(12)
tween5boat:Play()
wait(12)
tween6boat:Play()
wait(12)
tween7boat:Play()
wait(12)
tween8boat:Play()
end