mouse.KeyDown:connect(function(key)
	if key == "x" and enabled == true then
		enabled = false
		print("x pressed")
		there= true
		game:GetService("Chat"):Chat(char.Head,"Lightning Trident!")
		
		spear = Instance.new("Part", game.Workspace)
		spear.BrickColor = BrickColor.new("Gold")
		spear.CanCollide = false
		spear.Size = Vector3.new(1,1.2,10.41)
		spear.Parent = game.Workspace
		
		
		mesh = Instance.new("SpecialMesh", spear)
		mesh.MeshId = "http://www.roblox.com/asset/?id=30694864"
		mesh.MeshType = "FileMesh"
		mesh.Scale = Vector3.new(2,2,2.5)
		spear.CFrame = torso.CFrame *CFrame.new(0,0,-5)
		
		weld = Instance.new("Weld")
		weld.Parent = hrp
		weld.Part0 = hrp
		weld.C0 = hrp.CFrame:inverse()
		weld.Part1 = spear
		weld.C1 = spear.CFrame:inverse()
		
		while there == true do
			wait(0)
			spear.CFrame = CFrame.new(spear.Position, mouse.Hit.p)
		end
		
	end	
end)

4 comments

0

Try parenting the part to the player model.

0

Same result, the player is flung. If you meant game.Players.LocalPlayer.Character then it would error. Thanks for trying though

0

Are the parts anchored? If so, that is likely why. I had a problem with a tool, where welding it while anchored resulted in flinging. Unanchoring fixed.

0

No the part is not anchored, I inserted BodyVelocity into the part and it goes into motion.