Why doesnt this work?

local Add = script.Parent.Add
local Block = script.Parent.Block
local ViewAvatar = script.Parent.Search


Block.Activated:Connect(function()
	local PlayerObject = script.Parent.Parent:GetAttribute("Player")
	game:GetService("StarterGui"):SetCore("PromptBlockPlayer", {
		Player = game.Players:GetPlayerByUserId(PlayerObject)
	})
end)
CoreGui.RobloxGui.CoreScripts/BlockPlayerPrompt:100: Invalid argument to PromptBlockPlayer

Looking at the documentation, it looks like the argument needs to be a Player, not a table with a “Player” key.

PromptBlockPlayer

Prompts the current player to block the given Player.

Name Type Default Description
player Player Required The player who should be blocked

thanks i just had to remove the table part i just had that because i saw it on the forums someone posted it