Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I convert Parts/TotalParts into a percentage?

I've made a script that loads a map and shows how many parts are loaded out of how many parts there are in the map. I've decided I want to change it so that it shows the percentage loaded, but I need help since I have no idea how to do that. Here is what I have now:

https://gyazo.com/4babe81a5d374516c4d7d86f80166b98

What I mean by percentage loaded is instead of the "[0/351]" it would show 0% or whatever percentage it is. Also why does it stay at 0/351 then skip to like 100/351? Is this to do with lag?

3 comments

0

local percent = (5/10)*100 -- just change the numbers 5 and 10, then to write the percent do (percent.."%").

0

What do I change the 5 and 10 to? Parts and TotalParts?

0

nvm

1 answer

From the looks of it, that first "island" in the back isnt in the folder or whatever you are using to load the parts (i cant be sure because no script was provided).

AS for the percentage, you could look it up but here is a snippet ~

local percentage = "%"..(loadedBricks / totalBricks) * 10)

1 comment

0

It's fine, It was loading a model with a large amount of parts, so it lagged the game. I ungrouped the model and it runs smoothly now.

This discussion is preserved as it was. New answers, comments, and votes are closed.