Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Is there a way to test for Guests in a script?

I know that there's someway to do that, but i don't know how.

Psuedo code I want to find out how to do:

If there is a guest in Players
Teleport them to the Guest area
end

3 comments

0

Check for a negative userID

0

@adark testing this out

0

the negative id's should work. i reccomend you dont do this though because you could get banned.

1 answer

To perfect magiccube3's answer, the Guest actually have a Negative id, here is an example code.


game.Players.PlayerAdded:connect(function(player)
        if player.userId < -1 and player.Name:sub(1,6)=="Guest " then -- if a user has at least the name guest then it sets the player as a guest.
        --code
    end
end)

1 comment

0

I will test this after I test my code, thank you for helping :)

This discussion is preserved as it was. New answers, comments, and votes are closed.