of     1   

FireController1847
#182685876Saturday, January 30, 2016 6:33 PM GMT

I have this script: while true do if script.Parent.Parent.OpenClose.Value == true then repeat script.Parent.CFrame = script.Parent.CFrame + Vector3.new(0,-0.1,0) wait() until script.Parent.Position.Y >= -6 end wait(0.01) end And it's supposed to stop when the Y position is less than 6, but instead of stopping it just moves faster, how do I stop this? It's just roblox, deal with it.
SirTipsAlot
#182685999Saturday, January 30, 2016 6:35 PM GMT

y u no break Logicness is Logical
FireController1847
#182686103Saturday, January 30, 2016 6:36 PM GMT

What? It's just roblox, deal with it.
MrJoeyJoeJoey
#182686176Saturday, January 30, 2016 6:37 PM GMT

Okay so obviously this guy is a new scritper, and the first commenter is an idiot. Second of all you put a loop in a loop, not sure if you wanted to do this but whatever. first, use variables, second, anchor the part. local part = script.Parent repeat part.CFrame = part.CFrame + Vector3.new(0,-.1,0) wait() until part.Position.Y >= 6
FireController1847
#182686250Saturday, January 30, 2016 6:38 PM GMT

Dude, that's what I have, you just changed the symbol. I am not new to scripting, in fact I've been scripting for three years, but I had a brain fart. Even That doesn't work anyways :( It's just roblox, deal with it.
FireController1847
#182686350Saturday, January 30, 2016 6:39 PM GMT

It just never stops, ever. It just moves... Forever... It's just roblox, deal with it.
Lord_Narwhal
#182686418Saturday, January 30, 2016 6:40 PM GMT

joey you do realize you're being an ass right now to everyone, right
MrJoeyJoeJoey
#182686494Saturday, January 30, 2016 6:41 PM GMT

^ I dislike people who don't give enough information and or under explain to the new scripters. It just leads to more confusion instead of understanding
Lord_Narwhal
#182686540Saturday, January 30, 2016 6:42 PM GMT

you don't need to insult them they are genuinely trying to help
FireController1847
#182686542Saturday, January 30, 2016 6:42 PM GMT

Can we get to the point please? This is my script now and it doesn't stop moving... while true do if script.Parent.Parent.OpenClose.Value == true then local part = script.Parent repeat part.CFrame = part.CFrame + Vector3.new(0,-.1,0) wait() until part.Position.Y >= 6 end wait(0.01) end It's just roblox, deal with it.
MrJoeyJoeJoey
#182686639Saturday, January 30, 2016 6:43 PM GMT

Because your moving it down and your checking that it's moving up
FireController1847
#182686715Saturday, January 30, 2016 6:44 PM GMT

Okay, well I replaced the 6 with a -6 and now when it gets to -6 it will start moving FASTER. It's just roblox, deal with it.
Lord_Narwhal
#182686900Saturday, January 30, 2016 6:47 PM GMT

i haven't worked with loops in a while but this is what i would do if script.Parent.Parent.OpenClose.Value == true then local part = script.Parent while wait(.1) do part.CFrame = part.CFrame + Vector3.new(0,-.1,0) if part.Position.Y <=6 then return nil end end end
FireController1847
#182687104Saturday, January 30, 2016 6:50 PM GMT

Yay! Yours worked! Thanks! It's just roblox, deal with it.
MrJoeyJoeJoey
#182687196Saturday, January 30, 2016 6:51 PM GMT

I think yours would have worked also if you did =6, but his was more efficient
Lord_Narwhal
#182687214Saturday, January 30, 2016 6:52 PM GMT

"Yay! Yours worked! Thanks!" forgot to set it to -6 but w/e
FireController1847
#182687430Saturday, January 30, 2016 6:55 PM GMT

Okay I have another question now, how would I get it to go back UP when it's false? while true do if script.Parent.Parent.OpenClose.Value == true then local part = script.Parent while wait() do part.CFrame = part.CFrame + Vector3.new(0,-.1,0) if part.Position.Y <=-6.9 then return nil end end end wait(0.01) end This is what I have, what would I do? It's just roblox, deal with it.
Lord_Narwhal
#182688177Saturday, January 30, 2016 7:06 PM GMT

k best i got MOVEDOWN.Value = true local part = script.Parent if script.Parent.Parent.OpenClose.Value == true then while MOVEDOWN.Value == true do wait() part.CFrame = part.CFrame + Vector3.new(0,-.1,0) if part.Position.Y <=-6.9 then MOVEDOWN.Value = false return nil end end while MOVEDOWN.Value == false do wait() part.CFrame = part.CFrame + Vector3.new(0,.1,0) if part.Position.Y >= 6 then MOVEDOWN = true return nil end end end
FireController1847
#182688226Saturday, January 30, 2016 7:06 PM GMT

Is there any simple way? All I want is a door to open and close when you press the button :/ It's just roblox, deal with it.
MrJoeyJoeJoey
#182689924Saturday, January 30, 2016 7:31 PM GMT

yes local open = false click event if not open then for i = 1,6 do door.CFrame = door.CFrame * CFrame.new(0,1,0) end open = true else for i = 1,6 do door.CFrame = door.CFrame * CFrame.new(0,-1,0) end open = false end

    of     1