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

why is my kick script not working i cant understand the output why? and the error is diff

the output: 11:52:59.449 - Workspace.Script:4: function arguments expected near 'end' scriot:

game.Players.PlayerAdded:Connect(function(player)
	if not player:IsInGroupID(666) then
	player:kick
end)
end

3 comments

1

Just switch end and end)

1

Oh and alos make player:kick to player:Kick('A message if you want')

0

kthx

2 answers

✓ Accepted answer
game.Players.PlayerAdded:Connect(function(player)
    if not player:IsInGroupID(666) then
    player:Kick("Text")
end
end)

Try this..

3 comments

0

i don't think this will work. there is a ) that has to be closed at the function

0

yeah, I just edited it. I forgot about it.

0

13:18:37.936 - IsInGroupID is not a valid member of Player

your "end)" should be after the "end" because you have to close the if statement first AND THEN close the function with a "end)" also hit that accept button if this helped you!

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