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 9 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:

1If there is a guest in Players
2Teleport them to the Guest area
3end
0
Check for a negative userID adark 5487 — 9y
0
@adark testing this out connieoop 10 — 9y
0
the negative id's should work. i reccomend you dont do this though because you could get banned. HungryJaffer 1246 — 9y

1 answer

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

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


1game.Players.PlayerAdded:connect(function(player)
2        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.
3        --code
4    end
5end)
0
I will test this after I test my code, thank you for helping :) connieoop 10 — 9y
Ad

Answer this question