Nuke going in a different direction

I’m trying to make a nuke when a player buys a developer product but to make the nuke stable and unaffected by gravity I’m using a VectorForce(Force = gravity * mass).

The problem is when I use a VectorForce my nuke goes sideways and it doesnt stick in place how I want to. My plan is to use a vectorforce to stick it in place and then use a LinearVelocity
to slowly move it down.

Image:

This is the event that fires when a nuke is purchased(work in progress by the way):

local function VectorForce(newNuke)
	local VF = Instance.new("VectorForce")
	VF.Attachment0 = newNuke.Attachment
	--I tried Vector3.new(0,workspace.Gravity * newNuke:GetMass(),0) but it still did the same thing.
	VF.Force = newNuke.CFrame.LookVector + Vector3.new(0,workspace.Gravity * newNuke:GetMass(),0)
	VF.ApplyAtCenterOfMass = true
	return VF
end

ReplicatedStorage.Nuke.Event:Connect(function(player)
	local newNuke = script.Base:Clone()
	newNuke.CFrame = CFrame.lookAt(Vector3.new(0,200,0),workspace.Baseplate.Position)
	local VF = VectorForce(newNuke)
	VF.Parent = newNuke
	newNuke.Parent = workspace
	newNuke:SetNetworkOwner(nil)
end)

I found the issue which was in the CFrame.lookAt. I don’t know why but because I made it look at the baseplate’s position it went sideways.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.