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

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

Asked by 8 years ago

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
0
Check for a negative userID adark 5487 — 8y
0
@adark testing this out connieoop 10 — 8y
0
the negative id's should work. i reccomend you dont do this though because you could get banned. HungryJaffer 1246 — 8y

1 answer

Log in to vote
1
Answered by
woodengop 1134 Moderation Voter
8 years ago

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)

0
I will test this after I test my code, thank you for helping :) connieoop 10 — 8y
Ad

Answer this question