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

Why don't I stay sitting in a seat while this object is moving?

I want to be able to make an object like a space shuttle orbit around a planet while people can sit in seats on the object. I used this code, but I stay frozen in the position the seat first was before the orbit began while the entire ship continues to orbit properly. Here is the bit of code that affects the movement.

local model=script.Parent
model.PrimaryPart=model.Primary
model:SetPrimaryPartCFrame(((planet.CFrame)*(CFrame.fromEulerAnglesXYZ(0, -(i*speed), 0))*(CFrame.new(0, 0, altitude))))

Does it have something to do with using CFrame? Do I have to use Vector3 instead, or what?

1 answer

When changing CFrame, all welds connected to the moving part are automatically deleted, including the one that keeps your character connected to the seat.

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