Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

BodyPosition

Asked by
Xianon 105
10 years ago

How do you change the position value and gyro to make an sliding door?

1 answer

Log in to vote
1
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
10 years ago

I would suggest using CFrame. this is posible with:

-- THIS IS FOR UP
for i=1,50 do
script.Parent.CFrame = script.Parent.CFrame + Vector3.new(0,0.1,0)
wait(0.02)
end

wait(3)

-- THIS IS FOR DOWN
for i=1,50 do
script.Parent.CFrame = script.Parent.CFrame - Vector3.new(0,0.1,0)
wait(0.02)
end
Ad

Answer this question