Yeah so.. How would I check if a player is a guest, not someone with an acount playing? Or if thats even possible? Because I want a GUI to show up only for guests on my game...
COMMUNITY QUESTION
How to check if player is a guest?
2 answers
game:GetService('Players').PlayerAdded:connect(function( player )
if string.match(player.Name, 'Guest') and player.AccountAge < 1 then
print('playerIsGuest', true)
end
end)
The second line checks both for the pattern Guest in the player's Name and evaluates the player's AccountAge to ensure that they aren't a registered player with the pattern in their name.
Actually According to the RBX Wiki, it says that all guest have a negative userId, to check that you can add:
game.Players.PlayerAdded:connect(function(player)
if player.userId < -1 and player.Name:sub(1,6)=="Guest " then
--code
end
end)
Note I haven't tested this, any errors please reply back!
This discussion is preserved as it was. New answers, comments, and votes are closed.

8 comments
If the player's userId is less than 0 or if the name starts with 'Guest ' since users past 2006 or sometime like that, can not have spaces in their name.
Ok.. Ty
Guest are assigned a randomly-generated ID that ROBLOX stores Cookie on the User's computer that Keeps the ID which mean that "UserId less than 0" won't work.
UserOnly16Characters; I believe a guest's userId is -( their assigned Id)
"All Guests will take on the appearence of ROBLOX in-game, and will have a negative Player.userId." http://wiki.roblox.com/index.php?title=Guests It will work.
http://roblox.wikia.com/wiki/Guest
You're taking a external source as fact, as opposed to the content the creator of the product provided (meaning, you accept one person's thought over the creator's). What the external source may mean is that you get the same negative userId or the same Guest and number name.
Same could be said for ScriptingHelper.