Hello. basicly, i did a ball that follows a Player and vanish when touch them, it’s working, but the moviment isn’t so smooth, any advice to make it more smooth?
Here’s the code that make the movement:
local follow = true
local Speed = 15
while follow == true do
local distance = (GreenBall.Position - Player.Character.HumanoidRootPart.Position).Magnitude
if distance < 3 then
follow = false
GreenBall:Destroy()
else
task.wait(0.1)
Speed += 1
GreenBall.CFrame = CFrame.new(GreenBall.Position, Player.Character.HumanoidRootPart.Position)
LinearVelocity.VectorVelocity = GreenBall.CFrame.LookVector * Speed
end
end