this fonction paramater except a value of type agent->void, but this argument is an incompatible value of type type

.Subscribe() does not accept functions with <suspects> effect on it as an argument. you might want to use spawn{} to handle this. Here is how:

StartInvisiblity(P:agent)<suspends>: void=
     if (F := P.GetFortCharacter):
         F.Hide()
         Sleep(5.0)
         F.Show()

HandlePrimaryButton(P:agent): void=
     spawn{StartInvisiblity(P)}

In that way it should get rid of the error