Kick player when spawning as R15

Yooo, Since there is a bug when sometimes the character spawns as R15 in a R6 game, How i could kick the player if that bug happens? i tried detecting the rigtype in humanoid when the character spawns but it doesnt do anything. Also im questioning if this is a studio bug or a roblox bug?

1 Like

Instead go to game settings and go to a tab Named Avatar and force it to be R6

I know, This is a studio bug or a roblox bug, when its set to r6 it randomly spawns you to r15.

you can report that issue in studio bugs if it occurs a lot

local Players = game:GetService("Players")

local function checkAndKickIfR15(player)
    local function onCharacterAdded(character)
        task.wait(0.5)
        local humanoid = character:FindFirstChildOfClass("Humanoid")
        if humanoid and humanoid.RigType == Enum.HumanoidRigType.R15 then
            player:Kick("R15 characters are not allowed in this game")
        end
    end

    player.CharacterAdded:Connect(onCharacterAdded)
    if player.Character then onCharacterAdded(player.Character) end
end

Players.PlayerAdded:Connect(checkAndKickIfR15)
for _, player in ipairs(Players:GetPlayers()) do
checkAndKickIfR15(player) 
end
1 Like

Thanks, very good solution. :smiley:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.