I have been making a Security Scanner for an airport and I have made a system for a Security Agent to use. However, with this code, it only displays Account Name and Account ID, as well as the kick button not working.

local scanner = workspace.Scanner.scanpart
local minage = 0

local function oncollide(otherPart)
	local partParent = otherPart.Parent
	local humanoid = partParent:FindFirstChildWhichIsA("Humanoid")
	if humanoid then
		local name = humanoid.DisplayName
		local age = game.Players:WaitForChild(name).AccountAge
		local id = game.Players:WaitForChild(name).UserId
		script.Parent.name.Text = name
		script.Parent.id.Text = id
		script.Parent.age = age
		script.Parent.kick.Activated:connect(function()
			game.Players:WaitForChild(name):Kick("You were kicked by Security. Your account must be at leat"..minage.."days old.")
		end)
	end
end
 
scanner.Touched:connect(oncollide)

What would be a solution?