Tweening character issue

I’m making a kill effect for my game and the HumanoidRootPart of the Victim isn’t smoothly tweening to the goal CFrame. It works with no errors, however, once the tween is done the Victim’s HumanoidRootPart is teleported to it. Please help

char.HumanoidRootPart.Anchored = true
script["Portal"].CFrame = CFrame.new(script.Parent:WaitForChild("HumanoidRootPart").Position.X, script.Parent:WaitForChild("HumanoidRootPart").Position.Y + 5, script.Parent:WaitForChild("HumanoidRootPart").Position.Z)

local goal = {}
goal.CFrame = script["Portal"].CFrame

local x = tween:Create(char.HumanoidRootPart, TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.In, 0, false, 0), goal)

x:Play()

I believe it was just a visual glitch and had nothing to do with my code. I changed the TweenInfo to just the amount of seconds and it works perfectly.

local x = tween:Create(char.HumanoidRootPart, TweenInfo.new(2), goal)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.