Why Is My NPC Flying?!

What I’m Saying

I was building my horror game (Miny’s Toy Factory IA - Not released). I tried making “Green Slick Anomalies”, and I tried 4 versions of a standard humanoid version (like the noob), but they failed with hitboxes and even some didn’t walk (still didn’t figure that one out :laughing:). So, I tried a simpler simple, no animations humanoid. It was built of the noob, but all the parts made invisible, and a sludge mesh attached to the torso using a weld constraint. Eventually, I removed all the parts of the noob that might have been causing the problem (arms, legs), leaving only the torso and head. I edited the humanoid to fit not having these standard parts. But then, the problem arose.

What Is The Problem?

Welp, the humanoid started floating. I looked all around the forum for something related, but I found no relevant info.

Footage
  1. The Floatin’


    (Sorry if the video is dark. Well, you know how horror games can be)
  2. My Studio Picture

    [Straight from the “new and enhanced studio” (100% not new and enhanced)]
What I Want You to Do

I need help to solve why my humanoid is floating (Those first 4 Green Slick Anomalies took DAYS).

At this point your probably like: “Wow this developer likes parentheses”

Additional Details

  • I originally had an AI chase script inside of the model of the humanoid, and I disabled it, and it moves away from people (the script is working opposite too) and floating in the air.
  • I’ve tried different methods of meshes and humanoid setups, and none of them worked (huh?).
  • I’ve never had this problem before

DISCLAIMER: If you need more information please ask.

Also Incase You Were Wondering…

Here’s my group/community page: Urban Creator - Roblox
(Please join, I don’t have many members compared to the big ones)

Could you please up the brightness of the video? It’s too dark to see anything

I brightened the video. Check back whenever you’re available.

this would go in Help and Feedback > Scripting Support, we’re also gonna need to see your code

I FOUND THE ANSWER!!!

So…I found the answer. The eyes were tracking eyes, and because I used weld constraints, it pulled the rest of the humanoid along with it. It uses a very unstable script for welds and weld constraints:

local part = script.Parent
local camera = workspace.CurrentCamera
local runService = game:GetService("RunService")

runService.RenderStepped:Connect(function()
	if part and camera then
		local eyePos = part.Position
		local lookAt = camera.CFrame.Position

		part.CFrame = CFrame.new(eyePos, lookAt)
	end
end)

(I didn’t make the script.)

Also, this always happens. I always post a giant forum page and then find the answer within minutes later.

Thank you to everybody anyways!

Thank you, I always get the categories confused.