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

Can someone help me with this script?

Asked by 10 years ago

If an guest comes in my server, he needs to get kicked! :3

Look at the script

local hint = Instance.new("Hint")
hint.Parent = game.Workspace
hint.Text = "Guest got rekt! He got kicked from the server! :D"
wait(2)
hint:remove()
game.Players["Guest "]:remove()

Only thing that don't work, is that it don't removes the guest.

Please help me! D:

0
I'm not ignoring the tags. They are to be used specifically for what you're asking for. Don't spam tags that aren't useful. OniiCh_n 410 — 10y
0
:I AlphaDragon155 7 — 10y

4 answers

Log in to vote
0
Answered by 10 years ago

I looked at the script. Guest is not a username. even though there are guest like guest56796 example there, It may be very hard to kick guest everytime they come in. Hint is a message it puts in that players box. Even if you knew how the script would work and kicked guest, that would be a little unfair XD. Here is the main brief idea: "Guest" is not a user so it won't work, guest are not a member of roblox so it's impossible to quick guest form the game because I tested it and it's not a member of any group on roblox.

0
Opps mistake on impossible to quick on quick I meant kick XD Dragon539195 0 — 10y
Ad
Log in to vote
0
Answered by
Necrorave 560 Moderation Voter
10 years ago

I believe scripts like this are not allowed in Roblox.

Just warning you before you find the solution.

Also, guests have random numbers following "Guest", so I don't think your method would work the way you built it. It would have to have a lot more complexion added to it.

Log in to vote
0
Answered by 10 years ago

Btw, if you ban guests from games they think it is broken. Therefore guests would leave roblox and then roblox WILL ban you for this.

Best regards, Nathan.

~ Lava, from freedom comes elegance. ~

Log in to vote
0
Answered by 10 years ago

This should work

game:GetService("Players").PlayerAdded:connect(function(Player)
    a=Player.Name
    if string.sub(a,1,5) == "Guest" then
        Player:Kick()
    end
end)

Answer this question