Draft preview · this lesson is still being technically validated. Browser experiments and reference material remain available; trusted completion is enabled after publication.
v2 · Activity 2 of 4 · vector3 · cframe · position · 28 min Requires Roblox Studio
Vector3 holds three components and can represent a position or offset. CFrame holds position and orientation. Part.CFrame therefore describes the whole pose.
Capture the closed pose once, then derive the open pose by a local CFrame offset. This preserves the builder’s original orientation.
Create SlidingDoor and raise it four studs relative to its closed pose after two seconds. Restore its closed pose after two more seconds.
Interface: Complete the documented Studio hierarchy and self-check the behavior outside the browser.
| Input | Expected |
|---|
local original = marker.CFrame
local raised = original * CFrame.new(0, 2, 0)
marker.CFrame = raisedMultiplication applies the offset in the original local coordinate frame. The orientation remains part of the result.
New syntax: vector3, cframe, position
Your explanation is a self-check. Exact wording is not automatically graded.
Self-checked Studio exercise. A saved checklist records your own review; no uploaded place file or screenshot is executed here.
Workspace/SlidingDoor (Part, Anchored=true) ServerScriptService/DoorPose (Script, RunContext=Server)
Main guided reference implementation; use the hierarchy’s stated Script or ModuleScript type.
local door = game:GetService("Workspace"):WaitForChild("SlidingDoor")
local closed = door.CFrame
local open = closed * CFrame.new(0, 4, 0)
task.wait(2)
door.CFrame = open
task.wait(2)
door.CFrame = closedCheck Anchored and the exact SlidingDoor name.
Repeatedly adding to the current pose can accumulate drift; capture the base pose once.
This is a bounded learning lab. It has not been executed in an approved Roblox Studio environment by this website.
A checked checklist records your own review, not automated project competence or a community verification.
Vector3 holds three components and can represent a position or offset. CFrame holds position and orientation. Part.CFrame therefore describes the whole pose.
Capture the closed pose once, then derive the open pose by a local CFrame offset. This preserves the builder’s original orientation.
Moving an anchored Part by CFrame is a direct pose change in this lab. It is not a physical hinge or a complete door controller.
Replace this code with the starter? Download your draft to keep a copy.
Edit and run these files in Roblox Studio. This browser has no Roblox services, physics, or replication.
Your output will appear here.
Sign in with RoCreators to save private progress across devices. Community verification is separate.