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

How do i make part stay on the same spot?

while true do
script.Parent.Size = Vector3.new(20,20,20)
script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(1,1,1) --rotation is important
wait(0.01)
end

When the size changes, it teleports up, because it needs more space to expand, but i can't do that. If i hold position with Cframe.new(), it stops rotating. The problem is: it teleports brick up when size changes.

1 answer

✓ Accepted answer

Save the CFrame in a variable first before doing the size change. This way, we remember where the part was in the first place!

while true do
local remember = script.Parent.CFrame
script.Parent.Size = Vector3.new(20,20,20)
script.Parent.CFrame = remember * CFrame.fromEulerAnglesXYZ(1,1,1)
wait(0.01)
end

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