so the tween im making is very jittery bruh
here is my script
function common:_M1()
local p = self.args[1]
local weapon = self.args[2]
local count = self.args[3]
local blade = weapon.Blade
local caster = c.new(blade)
local rcp = RaycastParams.new()
rcp.FilterType = Enum.RaycastFilterType.Blacklist
rcp.FilterDescendantsInstances = {p, weapon}
caster.Visualizer = true
caster.RaycastParams = rcp
caster:HitStart()
self.will_enemy_collide = RaycastParams.new()
self.will_enemy_collide.FilterType = Enum.RaycastFilterType.Whitelist
self.will_enemy_collide.FilterDescendantsInstances = {game.Workspace.Part}
caster.OnHit:Connect(function(GOT_HIT)
local enemy = GOT_HIT.Parent
print(enemy.Name)
if enemy:GetAttribute("Times_Hit") and enemy then
times_hit += 1
local ROOT = enemy.HumanoidRootPart
local damageTaker = enemy.Humanoid
local attribute = enemy:GetAttribute("Times_Hit")
if tick() - times_since_last_hit >= time_thresh_COMBO_RESET then
times_hit = 0
enemy:SetAttribute("Times_hit", times_hit)
end
times_since_last_hit = tick()
enemy:SetAttribute("Times_Hit", times_hit)
local will_hit = workspace:Raycast(ROOT.Position, ROOT.CFrame.LookVector * -100, self.will_enemy_collide)
if enemy:GetAttribute("Times_Hit") < 3 then
local f = 900
ROOT:ApplyImpulse(p.HumanoidRootPart.CFrame.LookVector * f)
end
if enemy:GetAttribute("Times_Hit") == 3 and will_hit then
local position = will_hit.Position
local distance = will_hit.Distance
local new = Vector3.new(position.X, position.Y + 17, position.Z)
local tweenService = game:GetService("TweenService")
local info = TweenInfo.new(.7, Enum.EasingStyle.Sine, Enum.EasingDirection.In, 0, false, 0)
local goal = {Position = new}
local tween = tweenService:Create(ROOT, info, goal)
tween:Play()
tween.Completed:Connect(function()
print("Succesfully completed :)")
end)
end
end
end)
task.wait(self.args[4])
caster:HitStop()
end
pls scroll down to the end to see what tween im making with what values
for some reason the tween is jittery
i switched to lerp which seems to have fixed the problem but im just curious why this tween was jittery