Here is my current code, its in local script .
local frame = script.Parent local text = script.Parent:WaitForChild("TextLabel") for i=1,5 do text.Text = "Loading Story Mode (1%)" wait(1) text.Text = "Loading Story Mode (5%)" wait(1) text.Text = "Loading Story Mode (15%)" wait(1) text.Text = "Loading Story Mode (20%)" wait(1) text.Text = "Loading Story Mode (25%)" wait(1) text.Text = "Loading Story Mode (30%)" wait(1) text.Text = "Loading Story Mode (35%)" wait(1) text.Text = "Loading Story Mode (40%)" wait(1) text.Text = "Loading Story Mode (45%)" wait(1) text.Text = "Loading Story Mode (50%)" wait(1) text.Text = "Loading Story Mode (55%)" wait(1) text.Text = "Loading Story Mode (60%)" wait(1) text.Text = "Loading Story Mode (65%)" wait(1) text.Text = "Loading Story Mode (70%)" wait(1) text.Text = "Loading Story Mode (75%)" wait(1) text.Text = "Loading Story Mode (80%)" wait(1) text.Text = "Loading Story Mode (85%)" wait(1) text.Text = "Loading Story Mode (90%)" wait(1) text.Text = "Loading Story Mode (95%)" wait(1) text.Text = "Loading Story Mode (99%)" wait(1) text.Text = "Loading Story Mode (100%)" end frame:TweenPosition(UDim2.new(-1,0,0,0),"In","Quart")
It's because you're using a for loop but not including this bit into the loop:
frame:TweenPosition(UDim2.new(-1,0,0,0),"In","Quart")
Since that part isn't in the loop, the script won't read it.
Edit: Though you don't need the for loop, I believe. so the new piece of code would be this:
local frame = script.Parent local text = script.Parent:WaitForChild("TextLabel") text.Text = "Loading Story Mode (1%)" wait(1) text.Text = "Loading Story Mode (5%)" wait(1) text.Text = "Loading Story Mode (15%)" wait(1) text.Text = "Loading Story Mode (20%)" wait(1) text.Text = "Loading Story Mode (25%)" wait(1) text.Text = "Loading Story Mode (30%)" wait(1) text.Text = "Loading Story Mode (35%)" wait(1) text.Text = "Loading Story Mode (40%)" wait(1) text.Text = "Loading Story Mode (45%)" wait(1) text.Text = "Loading Story Mode (50%)" wait(1) text.Text = "Loading Story Mode (55%)" wait(1) text.Text = "Loading Story Mode (60%)" wait(1) text.Text = "Loading Story Mode (65%)" wait(1) text.Text = "Loading Story Mode (70%)" wait(1) text.Text = "Loading Story Mode (75%)" wait(1) text.Text = "Loading Story Mode (80%)" wait(1) text.Text = "Loading Story Mode (85%)" wait(1) text.Text = "Loading Story Mode (90%)" wait(1) text.Text = "Loading Story Mode (95%)" wait(1) text.Text = "Loading Story Mode (99%)" wait(1) text.Text = "Loading Story Mode (100%)" wait(2) frame:TweenPosition(UDim2.new(-1,0,0,0),"In","Quart") wait(1)
Hope this helps.
You are not using the for
loop correctly. What your code will do is load from 1% to 100% 5 times. If you want it to increase by 5% every second, you need to use the for
loop differently. Here's an example:
local amtLoaded = 0 for i = 1, 5 do amtLoaded = amtLoaded + 5 text.Text = "Loading Story Mode (" ..amtLoaded.. "%)" wait(1) end
The for
loop repeats whatever is inside of it the specified number of times. So in the sample above, it will add 5 to the variable amtLoaded each iteration and then change the text to the current percentage.