So I'm creating a theater where the show will be run by a script. One thing i have are curtains that will automatically open when the show begins. Now I have a script to open the curtains, unfortunately, it's not quite how I want them to open. Instead of the curtains sliding open, they suddenly open which doesn't look really good. I need the curtains to slide open but I don't really know what else I need to do with my script. Heres some part of the script for the curtains
wait(4) for i = 0,15,0.1 do SD1.CFrame = SD1.CFrame*CFrame.new(0,(0.9*9),0)
I know for sure that im missing some scripts but I dont know what.
First, you always need to add "end" at the end of loop, or it won't work. You need to explain for computer what is "SD1" with local
at beginning of script. To make curtains sliding open you need to add wait()
. Here's the fixed version:
local SD1 = script.Parent wait(4) for i = 0,15,0.1 do SD1.CFrame = SD1.CFrame*CFrame.new(0,(0.9*9),0) wait(0.1) end