Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I get the name of the game in a local script?

Asked by 5 years ago

I dont have any scripts and when I use print(game.Name) all it does is print "Place2" even though its like my 201st place. I just need a little script to make this work.

0
I would do the getgameid function then just convert the syntax to letters but im not for sure Dev_Coda 31 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago
local name = game.Name
local id = game.GameId

print("https://www.roblox.com/games/"..id.."/"..name)

the game global variable has two properties that pertain to its name, the .Name and .GameId

You can get the link to the game if you wanted using the above code

If the game has multiple Places, you can also use the .PlaceId Property in a similar fashion

0
Thank you Protogen_Dev 268 — 5y
Ad

Answer this question