I made a script to fly a part after a character, but for some reason the part (shaped as a Ball) only rolls on the floor -- it doesn't move in the Y-Axis after the character.
I am personally awful with BodyGyros and BodyPositions, but I looked it up on the wiki and everything seems fine.
The functions it uses to move are below.
Thank you in advance!
-- NOTE: "bludger" points to the part
function move(target)
local dir = (target.Position - bludger.Position).unit
local spawnPos = bludger.Position
local pos = spawnPos + (dir * 1)
bludger:FindFirstChild("BodyGyro").CFrame = CFrame.new(pos, pos + dir)
bludger:FindFirstChild("BodyGyro").MaxTorque = Vector3.new(9000,9000,9000)
end
function moveTo(target)
bludger.BodyPosition.Position = target.Position
bludger.BodyPosition.MaxForce = Vector3.new(10000,10000,10000) * bludger.Speed.Value
end
