while wait(.1) do
local pos = Player.Character.HumanoidRootPart.Position + Player.Character.HumanoidRootPart.CFrame.LookVector*-4
Ndragon.CFrame = CFrame.new(pos,Player.Character.HumanoidRootPart.Position) * CFrame.new(3,0,0) * CFrame.Angles(0, math.rad(0), 0)
end
How would I tween the script above to move more smooth instead of looking laggy.
Something like this. I haven’t tested this, but it should work.
local TweenService = game:GetService("TweenService")
local info = TweenInfo.new(
0.1, -- time for transition
Enum.EasingStyle.Linear -- type of style for the transition
)
while wait(.1) do
local pos = Player.Character.HumanoidRootPart.Position + Player.Character.HumanoidRootPart.CFrame.LookVector*-4
TweenService:Create(Ndragon,info,{CFrame = CFrame.new(pos,Player.Character.HumanoidRootPart.Position) * CFrame.new(3,0,0) * CFrame.Angles(0, math.rad(0), 0)}):Play()
end
while wait(0.1) do
local Goal = {
CFrame= CFrame.new(Player.Character.HumanoidRootPart.Position + Player.Character.HumanoidRootPart.CFrame.LookVector*-4,Player.Character.HumanoidRootPart.Position) * CFrame.new(3,0,0) * CFrame.Angles(0, math.rad(0), 0)
}
local Tween_Info = TweenInfo.new(0.1,Enum.EasingStyle.Linear)
local Tween = TweenService:Create(Ndragon,Tween_Info,Goal)
Tween:Play()
end
while its not the most clean code u get the basics