Support on humanoid script thing

Hello so I made this script so when a rank hits a block it kicks them. It says that the diffrent parts for example left leg is cannot be part of the GetRankInGroup

local wall = game.Workspace.WallStage.StageWall1

wall.Touched:Connect(function(plr)
	if plr.Parent:FindFirstChild("Humanoid") then
		if plr:GetRankInGroup (6559630) == 5 then
			plr.kick("Test kick")
			end
	end
end)

plr is not a Player object. It is a BasePart part of the Character assembly which you need to use to find out who that player is.

1 Like

How would you go to doing that>

Assume the part is child of Character and that you have declared Players to game:GetService("Players"), declare player to Players:GetPlayerFromCharacter(hit.Parent).

Sometimes it doesn’t work, just because it hits a different part(accessories) and hit:FindFirstAncestorOfClass("Model") should solve that problem.