basically this is the only script I can find that works but it doesn't rotate the pet to the direction I'm facing.
Here is my code:
local char = script.Parent.Parent
local hum = char:FindFirstChild("Humanoid")
local Head = char:FindFirstChild("Head")
local pet = script.Parent
local maxFloat = 1
local floatInc = 0.025
local sw = false
local fl = 0
while true do
wait()
if not sw then
fl = fl + floatInc
if fl >= maxFloat then
sw = true
end
else
fl = fl - floatInc
if fl <=-maxFloat then
sw = false
end
end
if pet ~= nil and hum ~= nil and Head ~= nil then
if hum.Health >= 0 then
local cf = Head.CFrame * CFrame.new(3,2+fl,3)
pet.BodyPosition.Position = Vector3.new(cf.x,cf.y,cf.z)
pet.BodyGyro.CFrame = Head.CFrame * CFrame.new(3,0,-3)
else
break
end
end
end
The whole pet with the script inside is under StarterCharacterScripts.
If anyone can help me or even find a better script with working rotation it would be greatly appreciated.
Thanks!

1 comment
hey dude, sorry but I just saw your comment now. I see you’ve accepted my answer so do you still need help or not? I’ll be glad to edit my solution.