How do I change the position of a tool?

I’m trying to make a system as to where you hold a tool into a part, a touched event detects it, the tool you were holding destroys itself, and then another tool is cloned from replicated storage into workspace at a specific position.

I don’t know how to change the position of the tool. Also the tool has multiple parts inside of it.

script.Parent.Touched:Connect(function(hit)
	if hit.Parent.Name == "Fuel" then
		hit.Parent:Destroy()
		local fuel = game.ReplicatedStorage.GrabbedItems.Fuel.Fuel:Clone().Parent == workspace
		fuel.CFrame = CFrame.new(-2.627, 88.259, 69.115)
		fuel.Anchored = false
	end
end)

Help?

Try to use Vector3 i think that will work maybe

script.Parent.Touched:Connect(function(hit)
	if hit.Parent.Name == "Fuel" then
		hit.Parent:Destroy()
		local fuel = game.ReplicatedStorage.GrabbedItems.Fuel.Fuel:Clone()
fuel.Parent = workspace
		fuel.Position = Vector3.new(part,position,here)
		fuel.Anchored = false
	end
end)

It tells me,

Position is not a valid member of Tool “Workspace.Fuel”

Does it need to be applied to a part?
And I have multiple parts so I’m not to sure how that would work.

Are you really changing the position of the tool? smh. Change the position of the tool’s Handle

Do fuel.Handle.Position instead of fuel.Position

you can’t make a same name on parent and child

yes you can, doesn’t matter what you name your stuff as long as it’s well formatted

oh really? thank you for correcting me! now i learn something from this

1 Like