I have been trying to figure out the issue for hours and I have yet to figure out the issue. The code is the exact same as the tutorial and it has yet to work, maybe because it was like a year ago but I have yet to figure out the problem and it keeps saying the things in the picture and doesn't get rid of the things in the shown pictures. The hoverboard doesn't even float up properly and just stays on the ground. I've just been so stuck on this and I'd like to figure out how to fix the issue, here's some of the areas for the errors shown in the picture.
local function Seated(active, currentSeat)
if active == false then
if connection == nil then return end
connection:Disconnect()
connection = nil
attachment:Destroy()
vectorForce:Destroy()
alignOrientation:Destroy()
animationTrack:Stop()
elseif currentSeat.Name == "Hoverboard" then
seat = currentSeat
attachment = Instance.new("Attachment", seat)
vectorForce = Instance.new("VectorForce")
vectorForce.Force = Vector3.zero
vectorForce.ApplyAtCenterOfMass = true
vectorForce.Attachment0 = attachment
vectorForce.Parent = seat
orientation = CFrame.fromMatrix(Vector3.zero, seat.CFrame.LookVector:Cross(Vector3.yAxis), Vector3.yAxis)
alignOrientation = Instance.new("AlignOrientation")
alignOrientation.Mode = Enum.OrientationAlignmentMode.OneAttachment
alignOrientation.CFrame = orientation
alignOrientation.Attachment0 = attachment
alignOrientation.Parent = seat
raycastParams = RaycastParams.new()
raycastParams.FilterType = Enum.RaycastFilterType.Exclude
raycastParams.FilterDescendantsInstances = {character, seat:FindFirstAncestorOfClass("Model")}
connection = RunService.PostSimulation:Connect(Loop)
animationTrack:Play()
end
end