Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Help Welding to a character?

Hello everyone my issue today is I am trying to make a part on a humanoidrootpart of a character that I will develop fully if I can do it with a normal part. here is my script so far.

game.Players.PlayerAdded:Connect(function(player)
	game.Workspace:WaitForChild(player.Name)
	local bob = game.Workspace:FindFirstChild(player.Name)
	local root = bob.HumanoidRootPart
	local it = Instance.new("Part", root)
	it.Name = "block"
	local weld = Instance.new("Weld")
	weld.Part0 = root
	weld.C0 = root.CFrame:inverse()	
	weld.Part1 = it
	weld.C1 = it.CFrame:inverse()
	weld.Parent = it
	it.Anchored = false
	it.CFrame = root.CFrame
	
	
	
end)
	

The part ends up spawning far from me and does move along with me but makes my motion go haywire Can I please have help fixing this?

1 answer

I will mark this post as solved because I figured It out by changing it from cframe to position which solved everything

This discussion is preserved as it was. New answers, comments, and votes are closed.