of     1   

cd3_Objective
#183169837Sunday, February 07, 2016 8:16 PM GMT

Instead of this game.Workspace.MainCurtain.CFrame = game.Workspace.MainCurtain.CFrame+Vector3.new(0,0.1,0) wait(0.1) game.Workspace.MainCurtain.CFrame = game.Workspace.MainCurtain.CFrame+Vector3.new(0,0.1,0) wait(0.1) game.Workspace.MainCurtain.CFrame = game.Workspace.MainCurtain.CFrame+Vector3.new(0,0.1,0) wait(0.1) game.Workspace.MainCurtain.CFrame = game.Workspace.MainCurtain.CFrame+Vector3.new(0,0.1,0) wait(0.1) game.Workspace.MainCurtain.CFrame = game.Workspace.MainCurtain.CFrame+Vector3.new(0,0.1,0) what could I do to make it only 1 line of code so it still runs like this?
cofunction
#183169880Sunday, February 07, 2016 8:16 PM GMT

while wait(0.1) do game.Workspace.MainCurtain.CFrame = game.Workspace.MainCurtain.CFrame+Vector3.new(0,0.1,0) end #Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217")
cd3_Objective
#183170921Sunday, February 07, 2016 8:33 PM GMT

What would it be if I wanted it to loop, then stop after 10 seconds? Thanks.
cofunction
#183171041Sunday, February 07, 2016 8:35 PM GMT

local num = 0 while wait(0.1) do game.Workspace.MainCurtain.CFrame = game.Workspace.MainCurtain.CFrame+Vector3.new(0,0.1,0) num = num + .1 if num >= 10 then break end end #Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217")
cd3_Objective
#183171524Sunday, February 07, 2016 8:42 PM GMT

local CurtainOpen = workspace:WaitForChild("CurtainOpen") local num = 0 CurtainOpen.Changed:connect(function(NewValue) if CurtainOpen.Value == true then while wait(0.1) do game.Workspace.MainCurtain.CFrame = game.Workspace.MainCurtain.CFrame+Vector3.new(0,0.1,0) num = num + .1 if num >= 10 then break end end something is wrong. It is not working.
cofunction
#183171626Sunday, February 07, 2016 8:44 PM GMT

1.) Make sure "CurtainOpen" actually exists in "workspace:WaitForChild("CurtainOpen")" 2.) Put a print in the loop "print(num)" or something to see if it prints. 3.) If CurtainOpen actually exists make sure it's value is actually = to true not false. #Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217")
C_Sharper
#183171633Sunday, February 07, 2016 8:44 PM GMT

for i = 1,5 do game.Workspace.MainCurtain.CFrame = game.Workspace.MainCurtain.CFrame+Vector3.new(0,0.1,0) wait(.1) end
cd3_Objective
#183172203Sunday, February 07, 2016 8:52 PM GMT

Figured it local CurtainOpen = workspace:WaitForChild("CurtainOpen") local num = 0 CurtainOpen.Changed:connect(function(NewValue) if CurtainOpen.Value == true then while wait(0.1) do game.Workspace.MainCurtain.CFrame = game.Workspace.MainCurtain.CFrame+Vector3.new(0,0.1,0) num = num + .1 if num >= 10 then break end end end end ) But, when I want it to go up again it only goes up 0.1 studs, then stops.
cd3_Objective
#183176366Sunday, February 07, 2016 9:55 PM GMT

So, with that done. How would I make it so it would have buttons that moved it?
LegendaryAccount
#183176539Sunday, February 07, 2016 9:57 PM GMT

a click detector would be like this script.Parent.ClickDetector.MouseClick(player) for i = 1,5 do game.Workspace.MainCurtain.CFrame = game.Workspace.MainCurtain.CFrame+Vector3.new(0,0.1,0) wait(.1) end end)
LegendaryAccount
#183176575Sunday, February 07, 2016 9:58 PM GMT

script.Parent.ClickDetector.MouseClick:connect(function(player) for i = 1,5 do game.Workspace.MainCurtain.CFrame = game.Workspace.MainCurtain.CFrame+Vector3.new(0,0.1,0) wait(.1) end end) sorry
cd3_Objective
#183340462Wednesday, February 10, 2016 10:00 PM GMT

Okay. With the code above, how would I stop players pressing loads of times to make it go very high? for example local a = workspace.Curtain.MainCurtain if a.position = ("??,??,??") then end (not allowed to go higher or lower)
cd3_Objective
#183378188Thursday, February 11, 2016 3:44 PM GMT

?

    of     1