generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How to know for SURE its a guest?

Previous Thread :: Next Thread 
iSpecializinq is not online. iSpecializinq
Joined: 31 May 2015
Total Posts: 2182
20 Jun 2015 09:10 AM
Because what if someone put guest in their name..?
Report Abuse
computerchris is not online. computerchris
Joined: 02 May 2009
Total Posts: 665
20 Jun 2015 09:12 AM
IIRC, guests name's are a specific way..

"Guest ####"

There's always a space between the numbers and guest. Not sure if it's still that way, but there you go. I also remember they have something different with they userId.
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
20 Jun 2015 09:14 AM
if Player.UserId == -1 then
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
20 Jun 2015 09:15 AM
Guest's don't have a positive userId so just check if it's -1.

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
20 Jun 2015 09:15 AM
Another alternative(s) would be:

if string.find(Player.Name, "Guest ") then
if string.sub(Player.Name, 1, 6) == "Guest " then
Report Abuse
jode6543 is not online. jode6543
Joined: 16 Jun 2009
Total Posts: 5363
20 Jun 2015 09:22 AM
I'm not sure if it is -1 exactly, but their user id is always negative. So:
if player.userId < 0 then
--it's a guest, or a test player
end
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
20 Jun 2015 09:35 AM
"Guest's don't have a positive userId so just check if it's -1."

Actually, their userId is negative, not -1.
Each guest has a negative Id based on a cookie in their browser, and the guest's name is Guest plus the last four digits of the Id.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
20 Jun 2015 09:51 AM
if string.find("Guest 1234", "Guest (%d+)") then
--Guest
else
--Player
end
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
20 Jun 2015 09:54 AM
@Jarod That's not entirely correct:

http : / / postimg . org / image / 8nnpgdlj3 /
http : / / postimg . org / image / 5dwltkxdp /
http : / / postimg . org / image / die9y45yf /


It's not always the last 4 digits of their id :P
Report Abuse
JarodOfOrbiter is not online. JarodOfOrbiter
Joined: 17 Feb 2011
Total Posts: 20029
20 Jun 2015 09:57 AM
I know, I've even seen a guest 0, but it is the last four digits, but with the insignificant zeroes removed.
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
20 Jun 2015 01:42 PM
Wait wouldn't it be "Guest " instead of "Guest 0"?
Report Abuse
Hexabone is not online. Hexabone
Joined: 14 Jan 2013
Total Posts: 167
20 Jun 2015 01:46 PM
Checking if the UserId of the player is -1 is the most effective way to do this.
Report Abuse
vectorGunner is not online. vectorGunner
Joined: 23 Mar 2014
Total Posts: 784
20 Jun 2015 01:48 PM
Welp this has been a learning experience.
I know I didn't ask the question but this is all really neat.

So the best way to check would be if player.userId > 0 then.

Neat :D!
Report Abuse
AbstractMadness is not online. AbstractMadness
Joined: 22 Dec 2014
Total Posts: 20425
20 Jun 2015 01:48 PM
no
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image