
I Need To Find The Name Of The Localplayer, And Hopefully Not Need To Ask About Localplayer Again
Doesnt Matter How. But I Just Need Something. This Is A One Player Game

I Need To Find The Name Of The Localplayer, And Hopefully Not Need To Ask About Localplayer Again
Doesnt Matter How. But I Just Need Something. This Is A One Player Game
game.Players.LocalPlayer or the player near the poster?
Local Player. This Wont Work
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local Text = script.Parent.SurfaceGui.Room.Text
Text = player.."'s Room"
Just some nitpicking first to help, then I’ll get to the actual problem:
All right, now the actual problem!
You’re probably getting an error for concatenating an instance (the player) with a string. Do player.Name or player.DisplayName instead of just player. Next, you’re just reassigning a variable, not changing the text. So change the Text variable to:
local room = script.Parent.SurfaceGui.Room
room.Text = player.Name.."'s Room"
That’s it. Please, open the console next time, and try to tell us the errors that appear there.
Since this is a single player game and you are using a script to retrieve the player, you can do this.
local Player = game:GetService("Players"):GetPlayers()[1]
script.Parent.SurfaceGui.Room.Text = game.Players:GetPlayers()[1].DisplayName
Make sure that is a NORMAL script inside of the part that has the SurfaceGui.
local players = game:GetService("Players")
local player = players.LocalPlayer
local playerId = player.userId
local username = players:GetNameFromUserIdAsync(playerId)
This will work in any local script providing you’ve placed the script in a valid location.
That’s a little complex just to get the player. OP said that it was a single-player game, so they could just do game.Players:GetPlayers()[0] in a server script or local script.
It gets all the info about a user right from the get-go (the player object, the player’s user ID & the player’s name), so if any of it is required later then it can be simply accessed.
You don’t know if he needs it though, and the extra code is not necessary.