I am trying to make a group invite notification appear in another player's PlayerGui, but the MouseButton1Click function will not work for it.

``

script.Parent.MouseButton1Click:Connect(function()
	local player = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent
	local targetPlayer = game.Players:FindFirstChild(script.Parent.Parent.PlayerName.Text)
	targetPlayer.PlayerGui.HotbarGui.Invite.Visible = true
	targetPlayer.PlayerGui.HotbarGui.Invite.PlayerName.Text = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Name
	local userId = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent.UserId
	local thumbType = Enum.ThumbnailType.HeadShot
	local thumbSize = Enum.ThumbnailSize.Size420x420
	local content, isReady = game.Players:GetUserThumbnailAsync(userId, thumbType, thumbSize)
	targetPlayer.PlayerGui.HotbarGui.Invite.PlayerIcon.Image = content
	
	local function blankfunc()
		local localPlayer = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent.Parent
		local inviteNoti = targetPlayer.PlayerGui.HotbarGui.Invite
		local partyLocal = localPlayer.party
		local partyOther = targetPlayer.party
		
		local vPlayer = Instance.new("StringValue", partyOther.Players)
		vPlayer.Name = targetPlayer.Name
		local userId = Instance.new("IntValue", vPlayer)
		userId.Name = "UserId"
		userId.Value = targetPlayer.UserId
		
		local ePlayer = Instance.new("StringValue", partyLocal.Players)
		ePlayer.Name = player.Name
		local euserId = Instance.new("IntValue", ePlayer)
		euserId.Name = "UserId"
		euserId.Value = player.UserId
		
		inviteNoti.Visible = false
		inviteNoti.Parent.CreateParty.CurrentParty.Title.Text = localPlayer.PlayerGui.HotbarGui.CreateParty.CurrentParty.Title.Text
		inviteNoti.Parent.CreateParty.CurrentParty.Box.Visible =false
		inviteNoti.Parent.CreateParty.CurrentParty.Title.edit.Visible = false
		inviteNoti.Parent.CreateParty.CurrentParty.scroller.target.Value = partyLocal
	end
	
	targetPlayer.PlayerGui.HotbarGui.Invite.MouseButton1Click:Connect(blankfunc)
end)

can someone please help me?