Here is what I have so far, I want the sound to play then the door to open with at least 2 seconds wait! Here is what I have so far. It wont work! D: Also the sound is the same ID as it is in the script (Content Provider bit) The sound is in the script.
Speed = 0.1 -- Speed at which the door rises. Higher = faster.
Time = 5 -- Time between the door totally open and starting to close.
Running = false
for x,z in pairs(script.Parent.Parent:getChildren()) do
if z.Name == "Button" then
z.CD.MouseClick:connect(function ()
if Running == true then return end
Running = true
Game:GetService("ContentProvider"):Preload("http://www.roblox.com/asset/?id=134966578")
script.Sound:Play()
wait (2)
for i=1,script.Parent.Size.y/Speed*10+1 do
script.Parent.CFrame = script.Parent.CFrame*CFrame.new(0,0.1*Speed,0)
wait()
script.Sound:Stop()
end
wait(Time)
for i=1,script.Parent.Size.y/Speed*10+1 do
script.Parent.CFrame = script.Parent.CFrame*CFrame.new(0,-0.1*Speed,0)
wait()
end
Running = false
end)
end
end

2 comments
Are you getting any kind of output?
Yeah adark is right, what is the Output saying?