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

Need Help With My Automatic Curtain?

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.

2 comments

0

Are you trying to make a Model or a Part Move?

0

its a part

1 answer

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

3 comments

0

I hope it will help.

0

unfortunately it didn't, For one the script isn't located inside any part, its inside the workspace.

0

It need to be located in part.

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