I am using BP in a projectile, and I'm trying to get a jump/hold in the air kind of effect. And so I scripted it out, and added aiming (with BG). I expected it to work, and I tested and it just didn't position. It's where I want it to be (parented) but it just doesn't work for some reason. Help!

local Charge = 0

        local BG = Instance.new("BodyGyro")
        BG.Parent = Char.HumanoidRootPart
        BG.MaxTorque = Vector3.new(250000,250000,250000)
        BG.CFrame = CFrame.new(Char.HumanoidRootPart.Position, Mouse.Hit.p)
        BG.P = 25000
        BG.D = 140

	local BP = Instance.new("BodyPosition")
	BP.Parent = Char.HumanoidRootPart
	BP.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
	BP.Position = Char.HumanoidRootPart.Position
	BP.P = 15000
	BP.D = 1250
		
	script.Function:FireServer(Mouse.Hit.p)
		
        while BtnDown == true and Charge < 60 do
            BG.CFrame = CFrame.new(Char.HumanoidRootPart.Position, Mouse.Hit.p)
            Charge = Charge + 1
            wait()
        end
	BG:Destroy()
	BP:Destroy()
        ButtonEvent:FireServer()

3 comments

0

Any errors? Does the BodyGyro work but just not the BodyPosition?

0

Oh... Is this the same one lol

0

Yeah.. I thought I would make a new post