|
| 27 Nov 2015 07:33 PM |
When it get's to the coroutine; it breaks and goes back up to the start.
local phrases = {"Loading Assets..", "Activating Scripts..."} wait(5) script.Parent.TextLabel:TweenPosition(UDim2.new(0.35,0,0.1,0),"Out","Bounce",3) wait(5) script.Parent.TextLabel:TweenPosition(UDim2.new(0.35,0,0.3,0),"Out","Elastic", .5) script.Parent.TextLabel.Text = "I hope you enjoy the game!" wait(2) for i = 0,1,0.1 do script.Parent.TextLabel.TextTransparency = i wait() end script.Parent.TextButton:TweenSize(UDim2.new(0,200,0,100), "Out", "Bounce", 2) script.Parent.TextButton.MouseButton1Click:connect(function() script.Parent.TextButton:TweenSize(UDim2.new(0,200,0,0),"In", "Elastic", 1) wait(.5) wait(.4) for i = 1,0,-.1 do script.Parent.TextLabel.TextTransparency = i wait() end local words = coroutine.create(function() while wait() do print("Loading assets..") for i =1,#phrases do script.Parent.TextLabel.Text = (phrases[i]) wait(4) end end coroutine.yield(words) end) end) |
|
|
| Report Abuse |
|
|
| 27 Nov 2015 07:46 PM |
| Nevermind fixed the problem. |
|
|
| Report Abuse |
|
|
| 27 Nov 2015 08:04 PM |
local function runincoroutine(Function, ...) coroutine.resume(coroutine.create(Function), ...) end
runincoroutine(MyFunction, Argument1, Argument2, etc, etc) |
|
|
| Report Abuse |
|