I’ve looked through the Dev Hub and i couldn’t find anything.
So i want to make a basic loading screen counter starting from 0% and going up to 100%.
Since i am not a really good programmer (and this helping topic i’ve created says it all), i want somebody to tell me what is wrong on my script.
local count = script.Parent.Text
count = "0%"
while true do
wait(0.3)
count = "1%"
wait(0.3)
count = "2%"
wait(0.3)
count = "3%"
end
Every time i start the game, the text is still 1%.
Screenshots if needed.
It stays the same.
Properties
Placement.
Ignore the placement of the Icons. I’m gonna change them later.
Your best bet would be to change this to a local script so it runs on the player’s computer. If you need to switch to a server script use remote functions. If you need any help please reply and I’ll see what I can do.
I tried both of the scripts you showed me and none of them work. The text is still 0%. I also tried to put strings just as @LoveTheBears101 told me and it’s still not working. To be more clear, all i want to do is to make it count from 0% to 100%. Once again i am so sorry for being such a beginner in scripting.
local count = script.Parent
for i = 1, 100 do -- loop from 1 to 100
count.Text = i .. '%' -- concatenate the number with a "%" character
wait(0.1) -- wait a bit
end
It isn’t working because when you’re setting the variable
“local count = script.Parent.Text”
You’re just assigning the string of script.Parent.Text to the variable count
You’re not assigning count to the property
This should work:
for count = 1, 100 do
wait(0.3)
script.Parent.Text = count .. "%"
end