Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Need Help With My Automatic Curtain?

Asked by 5 years ago
Edited 5 years ago

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.

0
Are you trying to make a Model or a Part Move? SerpentineKing 3885 — 5y
0
its a part 1freshkidz1 12 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

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
0
I hope it will help. MiniPolak 7 — 5y
0
unfortunately it didn't, For one the script isn't located inside any part, its inside the workspace. 1freshkidz1 12 — 5y
0
It need to be located in part. MiniPolak 7 — 5y
Ad

Answer this question