Reputation: 11
Is there an easier way to set the part to its original position instead of having to copy and paste its new location? I have falling blocks for my parkour but I want them to reset back to its original position and orientation after 3 seconds?
Upvotes: 1
Views: 946
Reputation: 325
You'll want to save the part's original CFrame on server start, or whenever the part's creation occurs.
local Part: Part = nil -- Change nil to the part.
local CoordinateFrame: CFrame = Part.CFrame
--[[
At this point, you'd write all of your code here.
Once finished, the script will then continue to return the part to it's previous CFrame which is stored into a variable (CoordinateFrame).
]]
Part.CFrame = CoordinateFrame
Upvotes: 1