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

Part keeps falling away from paerent, why?

I'm trying to make a tool, I made a part called handle in the tool then put another part in that part, then I added a surface gui & text label to it, but the part with the text label keeps falling. To fix it I have to anchor the handle part but if I do that when I equip the tool it will teleport me to the original spot of the handle, how do I fix?

2 comments

0

If my answer helped Please accept it and upvote.

0

Weld

2 answers

Well first of I suggest you Weld all those parts that you need together, and in order to do that, you might want to take a look at this video first, if it didn’t help, then come back to me... https://www.youtube.com/watch?v=LEy0po6sLso&t=851s https://www.youtube.com/watch?v=eBMWLUAgNMs Accept and upvote if helied! :)

8 comments

0

When I weld its the same thing as anchor, it teleports me to the original spot of the tool

0

Oh yeah I forgot, don’t anchor it lol

0

Dont anchor the weld or the handle ?

0

The weld

0

when I unanchor weld it always goes back to anchor

0

Maybe take a look back at the video I made, and accept if helped

0

k

0

Did it help?

Hello! This is caused because your parts aren't welded. You can use this script below:

local prev
local parts = script.Parent:GetChildren()
for i = 1,#parts do
	if ((parts[i].className == "Part") or (parts[i].className == "Handle") or (parts[i].className == "WedgePart") or (parts[i].className == "Seat") or (parts[i].className == "TrussPart") or (parts[i].className == "VehicleSeat") or (parts[i].className == "UnionOperation") then
		if (prev ~= nil) then
			local weld = Instance.new("Weld")
			weld.Part0 = prev
			weld.Part1 = parts[i]
			weld.C0 = prev.CFrame:inverse()
			weld.C1 = parts[i].CFrame:inverse()
			weld.Parent = prev
			parts[i].Anchored = false
		end
		prev = parts[i]
	end
end
wait(3)

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