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

Can someone help me with this script?

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:

2 comments

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.

0

:I

4 answers

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.

1 comment

0

Opps mistake on impossible to quick on quick I meant kick XD

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.

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. ~

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)

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