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

Weld doesn't work for anchored parts?

I'm creating an elevator for my game which moves using CFrame and consists of a few parts which must move together but weld doesn't seem to work with them as they are anchored. Any solution?

1 answer

✓ Accepted answer

Yep, make sure the model has a primary part set as you can use SetPrimaryPartCFrame() and it moves the whole model relative to the primary part.

Then you can do something like this.

local speed = 0.5

for i = 1, 100 do
	local currentCFrame = script.Parent:GetPrimaryPartCFrame()

	script.Parent:SetPrimaryPartCFrame(currentCFrame * CFrame.new(0,speed,0))

	wait()
end

Now go to my question and help me about colors :3

1 comment

0

It works! Thank you!

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