Okay, So i have created a script for a brick to follow me , exactly behind my torso. using this loop function : while true do wait(0.005) brick.CFrame = Body.CFrame - Body.CFrame.lookVector * 1.5 brick.CFrame = Body.CFrame - Body.CFrame.lookVector * 1.5 end
It follows me, that part works. But how would I incorporate a hovering (up and down) addition into it, so that it follows me AND has that sweet animation that I ever so desire?
First, I see you are using a loop to set the part's position manually. This works, but not very well as it jitters. A better solution would be to use a weld, like so (assuming you are using the same variables):
Weld = Instance.new("Weld", Body) Weld.Part0 = Body Weld.Part1 = brick Weld.C0 = CFrame.new(0, 0, 1.5)
To do the animation, you can use a sine wave, like so:
local Wave = 0 while true do Weld.C1 = CFrame.new(0, math.sin(math.rad(Wave)), 0) Wave = Wave + 10 -- Increase number to increase speed. wait() end
Hope this helps.