Trying to move a mesh with code

I put it in ServerStorage and clone it when I hold out the hoe. Then I make another weld because my original one does not work.

well if it works now it works, congrats on finishing a part of your game!

The problem is the overlay still keeps falling even though I welded it

Are you welding it with a script or welding it by hand? If you set the parts correctly it should weld by hand, make sure is weldConstraint and not just weld…
by script:

local weld = Instance.new("WeldConstraint")
weld.Parent = game.Workspace.Somewhere -- very important 
weld.Part0 = hoe.apartofthehoe
weld.Part1 = thetracerpart
weld.Enabled = true

I did both. I even made another weld with a script and enabled it.

is the part’s parent the tool?

my limited knowledge tell me this should work since it literally work on my end if I weld it by hand

No its in a folder in workspace

That might be the problem (sorry for replying so late, went to get lunch)

unless only one player is allowed to have a hoe, the hoe in the player is likely a copy, so prob should put the part in hoe so it also get copy. (assuming its in starter pack, if you have some way to ensure everyone have a hoe without clone, enlighten me.)

Also, if its a folder in workspace, and more than one player holds out a hoe, which player would get the part?

Sorry I forgot to explain, the part is in ServerStorage and it gets cloned every time the tool gets held and deleted every time it is unequipped:

tool.Equipped:Connect(function()
	local check = invis:Clone()
	local char = tool.Parent
	local plr = game.Players:GetPlayerFromCharacter(char)
	check.Name = "dirtCheck"
	check.Parent = game.Workspace.Spawn.Farming
	local weld = Instance.new("WeldConstraint")
	weld.Part1 = char.HumanoidRootPart
end)
tool.Unequipped:Connect(function()
	local check = game.Workspace.Spawn.Farming:WaitForChild("dirtCheck")
	check:Destroy()
end)

works :confused:
robloxapp-20230727-1205429.wmv (1.4 MB)
script I used:

local invis = game.ServerStorage.Part
tool.Equipped:Connect(function()
	local check = invis:Clone()
	local char = tool.Parent
	local hrp = tool.Parent.HumanoidRootPart
	--local plr = game.Players:GetPlayerFromCharacter(char)
	check.Name = "dirtCheck"
	check.Parent = game.Workspace
	local weld = Instance.new("WeldConstraint")
	weld.Part1 = char.HumanoidRootPart
	weld.Part0 = check
	weld.Parent = game.Workspace
	check.Position = Vector3.new(hrp.Position.X,hrp.Position.Y-2.129,hrp.Position.Z)
    check.Orientation = char.HumanoidRootPart.Orientation
end)


image

Another problem with this is that the dirt overlay follows the player (even in the air). Is there any way to keep it on the ground?

So it follows the player while not? what do you mean

But nevermind that anyways,
to keep the part on the ground you could use a prismatic constraint instead of a weld…

local attachment0 = Instance.new("Attachment")
attachment0.Parent = tool.Handle
attachment0.Position = Vector3.new(0,0,0) -- relative to handle

local attachment1 = Instance.new("Attachment")
attachment1.Parent = check
attachment1.Position = Vector3.new(0,0,0) -- relative to part

local slider = Instance.new("PrismaticConstraint")
slider.Attachment0 = attachment0
slider.Attachment1 = attachment1
slider.Parent = tool
slider.LimitsEnabled = true
slider.LowerLimit = -5 --(prevent fall too much)

I want the overlay of where you are placing the dirt to follow the player (where ever you go it still shows you the overlay)

I replaced this with your current script and now there is no overlay

work in progress currently testing please wait…
robloxapp-20230727-1251539.wmv (2.8 MB)

Sorry if I am not clear but here is what it looks like now. It follows the player as they jump
image

If im seeing correctly, it follows a distance, but there is a gap bettween the player and the lay where it fell, so I guess lower the number on “Lowerlimit”

It just follows the player

I’m never going to get the exact number so I was just wondering if there was a way to bump the overlay back up to the top.