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

Builders Club Script Errors? [EDIT]

Ok seriously? Bringing my rep down to -3. Thanks a lot guys The script is to kick anyone that isn't obc

Here is script one

game.Players.PlayerAdded:connect(
function(child)
if child.MembershipType == Enum.MembershipType.OutrageousBuildersClub then
print 'One player has had acess'
else
child:Remove()
script.obc.Disabled = false
end end)

Script two is inside of script one (Local Script)

local gui = script.Nope:Clone()
gui.Parent = game.Players.LocalPlayer.PlayerGui

Any help? I've tried doing an all in one script; but It does not turn out well. Thanks!

2 comments

1

What exactly are you trying to do? Kick anyone who isn't OBC?

1

You didn't say what the script is supposed to do?

1 answer

✓ Accepted answer

I don't understand the purpose of your Gui, but I know it won't work. You cannot give a Gui to a player which doesn't actually exist! So you're just going to have to give that part up..

Your script was almost exactly what you wanted (excluding the whole Gui and localscript part), but instead of using child:Remove(), you should be using child:Kick() instead.

I've made your code a bit less messy below: (this is a regular script, not a local script)

game.Players.PlayerAdded:connect(function(p) 
	if p.MembershipType ~= Enum.MembershipType.OutrageousBuildersClub then
		p:Kick()
	end
end)

1 comment

0

Thanks!

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