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

How do I make both doors go down? i,v problem.

Visual example: https://www.youtube.com/watch?v=tS48Fsm7nic

Here's the script for the doors, only one is going down. I want both to go down. Can someone point me in the right direction please?

for i,v in pairs(game.Workspace.LockdownDoors:GetChildren()) do
	local num = 0
	repeat
		v.CFrame = v.CFrame + Vector3.new(0,-0.1,0)
		wait(0.02)
		num = num +1
	until num == 210
end

Thanks!

1 comment

0

I know this has already been answered but if you're trying to make the door look smooth you might want to look into lerp. (pretty much tweening for parts)

1 answer

✓ Accepted answer
doors=game.Workspace.LockDownDoors:GetChildren()
times=210

for i=1, times do
 for i=1,#doors do
 doors[i].CFrame = doors[i].CFrame + Vector3.new(0,-0.1,0)
end
wait(0.02)
end

tested

2 comments

0

Works great, thanks!

0

np

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