How would i make a part not spin while floating?

i have a “e” to fire part thing that floats, but the problem is I only know bodyvolcity to float, I don’t want it to spin when I fire it, I just need it to go straight. my script:

local UIS = game:GetService("UserInputService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local camera = workspace.CurrentCamera
local Player = Players.LocalPlayer
local pathToThePart = ReplicatedStorage.Part

UIS.InputBegan:Connect(function(Key, Chatted)
	if Chatted then
		return
	end
	if Key.KeyCode == Enum.KeyCode.E then
		local projectile = pathToThePart
		projectile.Parent = workspace
		projectile.CFrame = Player.Character.HumanoidRootPart.CFrame
		projectile.BodyVelocity.Velocity = Player.Character.HumanoidRootPart.CFrame.lookVector * 16
		end
end)

Not sure if this was a mistake, but you forgot to clone your projectile

Bit confused, but couldn’t you just set its MaxForce property to math.huge to prevent the part from moving at all?

i want it it move foward but not spinning

Just set the BodyVelocity’s MaxForce property to a high number then if you want to prevent it from spinning at all

Another issue is that you may need to Clone() it in order to replicate it across the client, but I highly doubt that

how would i change the script to clone the part?

that’s why it is spinning… it have no gravity at all so it spins when you push it

local UIS = game:GetService("UserInputService")
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local camera = workspace.CurrentCamera
local Player = Players.LocalPlayer
local pathToThePart = ReplicatedStorage.Part

UIS.InputBegan:Connect(function(Key, Chatted)
	if Chatted then
		return
	end
	if Key.KeyCode == Enum.KeyCode.E then
		local projectile = pathToThePart:Clone()
		projectile.Parent = workspace
		projectile.CFrame = Player.Character.HumanoidRootPart.CFrame
		projectile.BodyVelocity.Velocity = Player.Character.HumanoidRootPart.CFrame.lookVector * 16
        projectile.BodyVelocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
		end
end)

If you have a BodyAngularVelocity spinning the part, please remove that

there is none, the part is rotating 360 when i push it or stand on it (btw ill be afking for a few hours)