How to stop a tool from moving/falling without anchoring as it breaks the ConstraintWelds

I’ve tried several ways to do this, but the closest I got was this. I have to trigger Unequip twice in order for it to work, but on the first try it doesn’t work. Also, the broom/tool can still be pushed and the other parts can still spin/move when welded to the handle.

Condition: No anchoring the parts as it breaks the ConstraintWelds

1st Trigger:
image

2nd Trigger:
image

local broom = script.Parent
local unequipPrompt = broom.Head:WaitForChild('UnequipPrompt')
local equipPrompt = broom.Shaft:WaitForChild('EquipPrompt')
local ridePrompt = broom.Shaft:WaitForChild('RidePrompt')
local leavePrompt = broom.Shaft:WaitForChild('LeavePrompt')

broom.Owner.Value = broom.Parent.Parent.Name

unequipPrompt.Triggered:Connect(function(player)
	local character = player.Character or player.CharacterAdded
	local humanoid = character:FindFirstChild('Humanoid')

	if humanoid then
		broom.Parent = game:GetService('Workspace')
		
		broom:WaitForChild('Handle').CFrame = character:WaitForChild('HumanoidRootPart').CFrame * CFrame.new(Vector3.new(-1, 0, -5))
		broom:PivotTo(broom:GetPivot() * CFrame.Angles(math.pi * -0.5, 0, math.pi * 0.5))

		local attachment = Instance.new('Attachment')
		attachment.Parent = broom.Handle
		attachment.Position = Vector3.new(0, 0, 0)
		
		local attachment2 = Instance.new('Attachment')
		attachment2.Parent = broom.Handle
		attachment2.Position = Vector3.new(0, 0, 0)
		
		for index, value in broom:GetChildren() do
			if value:IsA('Part') or value:IsA('UnionOperation') then
				--value.Anchored = true

				--local linearVelocity = Instance.new('LinearVelocity')
				--linearVelocity.Parent = value
				--linearVelocity.MaxForce = math.huge
				--linearVelocity.VectorVelocity = Vector3.new(0, 0, 0)
				
				--local linearVelocity = Instance.new('LinearVelocity')
				--linearVelocity.Parent = value
				--linearVelocity.MaxForce = math.huge
				--linearVelocity.VectorVelocity = Vector3.new(0, 0, 0)
				--linearVelocity.Attachment0 = attachment
			end
		end

		--local linearVelocity = Instance.new('LinearVelocity')
		--linearVelocity.Parent = broom.Handle
		--linearVelocity.MaxForce = math.huge
		--linearVelocity.VectorVelocity = Vector3.new(0, 0, 0)
		--linearVelocity.Attachment0 = attachment

		--local alignPosition = broom:WaitForChild('Handle').AlignPosition
		--alignPosition.Attachment0 = attachment
		
		--local alignOrientation = broom:WaitForChild('Handle').AlignOrientation
		--alignOrientation.Attachment0 = attachment2
		
		local startPosition = broom:WaitForChild('Handle').CFrame

		broom:WaitForChild('Handle'):GetPropertyChangedSignal('CFrame'):Connect(function()
			broom:WaitForChild('Handle').CFrame = startPosition
		end)
		
		broom:WaitForChild('Handle').Anchored = true
		
		unequipPrompt.Enabled = false
		equipPrompt.Enabled = true
		ridePrompt.Enabled = true
	end
end)

You try to AlignOrientation to straighten up the tool once it’s in the workspace.
Edit: looks like you already tried that. Try making it massless, although i don’t know if gravity would work on it.

How would I use AllignOrientation, should I use one attachment and do I make 1 for each individual part?

I know you said no anchoring but maybe try disabling the constraint welds before you anchor the parts and then reenable after you unanchor it, if that still breaks it then you could try using body position or set the cframe every frame with runservice

Thank you, I will try this and let you know.

Yeah, it still seems to break the tool apart.
image

Thank you, I’ve used AlignOrientation and AlignPosition and it has solved my issue.

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