Welding model to character foot

  1. What do you want to achieve?

I want to achieve a code that clones a model in RepStorage (which is a shoe) and make it weld to the foot and make it move with it, like a shoe in Bee Swarm Simulator. I have a weld script but it isn’t working out too well.

  1. What is the issue?

When I do it, it works, however, the shoe goes in the middle of my leg when I want it on the foot.
Here is my code.

local function GiveCleat(player)
	
	repeat wait() until player.Character
	
	local Cleat = game.ReplicatedStorage["Salient Aquamarine"]:Clone()
	local Character = player.Character
	
	local Attachment = Character:FindFirstChild("RightFootAttachment", true)
	local ParentOf = Attachment.Parent
	
	Cleat.Parent = ParentOf
	
	Cleat.shoes.CFrame = Attachment.CFrame
	local weld = Instance.new("Weld")
	weld.Name = "ShoeWeld"
	weld.Part0 = Cleat.shoes
	weld.Part1 = ParentOf
	--weld.C0 = ParentOf.CFrame:Inverse()
	--weld.C1 = Cleat.shoes.CFrame:Inverse()
	weld.Parent = Cleat.shoes
	
end

game.Players.PlayerAdded:Connect(function(player)
	GiveCleat(player)
end)
  1. What solutions have you tried so far?
    I have ried using C0 and C1, but when I do, it’d always put my cleat like 10 miles in the sky, like the position my leg was at when my character was loading, I think. Not too sure.

I’ve been dodging learning welds so when I need to use them it bites me back real hard. Help will be appreciated against this! Been pulling on my hair.

Shouldn’t the welds Part1 be the player’s foot? The weld welds to gather the part 0 and the part 1, so you need it wo weld the the foot and to the shoe.

Part 1 is the Right Leg. I tried setting it to the Attachment, but when I do, it doesn’t even go on the leg at all.

Accidently hit the reply to, not reply to this message. Look at what I just sent.

You want to weld it directly to the right foot, not to the right foot’s attachment.

1 Like