HELP! Making a pet system and their are raycasting issues

You can write your topic however you want, but you need to answer these questions:

  1. I want the Pets To Float/Walk Above parts like in PSX instead of clipping through them

Here is the issue


The Pets Aren’t Moving to the baseplate but they do to the spawn pad and also are a different height when the player is on the spawn pad as well

  1. I’ve looked for sevral youtube tutorials and devforum posts and couldn’t find what im looking for

This is the script thats handling it all

local v1 = require(game.ReplicatedStorage:WaitForChild("Directory"))
local v2 = game:GetService("TweenService")
local v3 = game:GetService("RunService")
local v4 = game:GetService("Players")
local v5 = TweenInfo.new(-1,Enum.EasingStyle.Quint,Enum.EasingDirection.Out)
local v6 = v4.LocalPlayer
local v7 = workspace.Pets

local function GetFloorHeight(p1:Part) -- Pet Physical
	
	local r1 = RaycastParams.new()
	r1.FilterDescendantsInstances = {p1}
	
	local v10 = p1.Position
	local v11 = Vector3.new(0,-100,0)
	local v12 = workspace:Raycast(v10, v11, r1)
	
	if v12 then
		local v13 = v12.Position.Y + p1.Bottom.Position.Y
		
		return v13
	end
end



v3.RenderStepped:Connect(function()
	for _,v10 in pairs(v4:GetPlayers()) do
		if v10 and v10.Character then
			local v11 = v7:FindFirstChild(v10.Name)
			if v10 then
				if v10.Character then
					if v10.Character:FindFirstChild('Humanoid') then
						if v10.Character:FindFirstChild('HumanoidRootPart') then
							if v11 then
								for v12,v13 in pairs(v11:GetChildren()) do
									if v13 then
										if v13 then
											local v14 = 0.5*math.sin(12*tick())
											local v15 = 2*math.sin(-6*tick()) * 3
											local v17 = GetFloorHeight(v13)
											local v16 = v10.Character.HumanoidRootPart.CFrame * CFrame.new(require(script:WaitForChild("Positions_Idle"))[v12]) - Vector3.new(v13.Size.Y / 2,v17,0)
											pcall(function()
												if v10.Character.Humanoid.MoveDirection.Magnitude > 0 then
													v2:Create(v13,v5,{CFrame =  v16 * CFrame.new(0,-1 + v14,0) * CFrame.Angles(math.rad(v15),0,0)}):Play()
												else
													v2:Create(v13,v5,{CFrame =  v16 * CFrame.new(0,-1,0) * CFrame.Angles(0,0,math.rad(v15))}):Play()

												end
											end)
										end
									end
								end
							end
						end
					end
				end
			end
		end
	end
end)