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

How to raise a model?

Hello,

I've tried to raise a part up and down, and it works, but I can't seem to do the same with a model?

Here is my script:

p1=game.Workspace.Balloon
repeat
for q=1,4 do
	p1.CFrame=CFrame.new(-127.4, q, 150.7)
	wait(.12)
end

for a=1,4 do
	p1.CFrame=p1.CFrame+Vector3.new(0,-1,0)
	wait(.06)
end
wait(.05)
until 1+1 ~= 2

What can I do to make it raise a model?

3 answers

You will need to set the PrimaryPart property of the model and then you can edit its CFrame. The rest of the model will move along with the Primary Part.

p1 = game.Workspace.Balloon -- The Model
p1.PrimaryPart = p1:FindFirstChild("Part") -- Set the PrimaryPart here
repeat
for q=1,4 do
	p1:SetPrimaryPartCFrame = CFrame.new(-127.4, q, 150.7) -- Set the Primary Part CFrame
	wait(.12)
end

for a=1,4 do
	    p1:SetPrimaryPartCFrame = p1.CFrame+Vector3.new(0,-1,0)
	    wait(.06)
end
wait(.05)
until 1+1 ~= 2

MoveTo function.

game.Workspace.ModelName:MoveTo(CFRAME)

game.Workspace.PartName.Position = game.Workspace.PartName.Position + Vector3.new(0, 5, 0)

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