How could i format this?

  1. What do you want to achieve? to have the game version formated like Example: 1.3.1.4

  2. What is the issue? i dont understand roblox formating system

  3. What solutions have you tried so far? ive looked at the developer hub

my current script below

local textLabel = script.Parent

local placeVersion = game.PlaceVersion
textLabel.Text = string.format("Server version: %s", placeVersion)

What does this currently output.

currently is just outputs “Server Version: 1394”

“%s” is meant for a string input while PlaceVersion is an int.

local textLabel = script.Parent

local placeVersion = game.PlaceVersion
textLabel.Text = string.format("Server version: %s", tostring(placeVersion))

Edit: I forgot ints could do that

Would that not just output the same thing?
if you read my post you would know what i actually want to achieve

That is the expected out put, what you did is the same thing as:
textLabel.Text = = "Server Version: "..placeVersion

yeah i tried formating it but i dont really understand it

Try this:

local textLabel = script.Parent

local placeVersion = tostring(game.PlaceVersion)
local split = string.split(placeVersion, "")
placeVersion = ""
for _, num in pairs(split) do
    placeVersion ..= num.."."
end
textLabel.Text = string.format("Server version: %s", placeVersion)

This will only work for versions under 10, then it would look like: 1.0.4.5.2 instead of 10.4.5.2

Yes, I realized what was wrong with my post, I’m just used to more strict Programming. The problem is that “PlaceVersion” is just how many updates your place has been through. You would have to make the place version say “v1.3.1.4” yourself or make some code to have it go off of the place version.

It still outputs the same thing :c

Oh wait try it now, I forgot something lol

still also outputs the same thing :7
image

This might not be the best but it does the job…

local placeVersion = game.PlaceVersion
placeVersion = tostring(placeVersion)
local otherThing = ""

for i = 1 , #placeVersion do
	otherThing = otherThing..placeVersion[i].."."
end
otherThing = otherThing:Sub(1 , #otherThing - 1)

Try it, I edited it. You retried before I edited

That does the same thing my version does. Just using a different loop. But just like mine, it will only work for versions under 10

I didnt see it, my bad…

chaaaarrrrrrssss

1 Like

Thanks man it works now! the reason it didnt was because i didnt comit it ;-; Thanks again

2 Likes