Abilities display does not work with abilities from Game.SpawnAsset

I tried for like 2 hours to make an ability loaded from Game.SpawnAsset show up in an ability display.
Anyone experienced the same issue?

My code is simple: (server context)

local abilityTemplate = script:GetCustomProperty("AbilityTemplate")

function OnPlayerJoined(player)
    local ability = World.SpawnAsset(abilityTemplate)
    ability.owner = player


Then I have a client context (always present) with an ability display that have the same binding as the ability. I can perform the ability, but the display will not show it.

I'm not sure if this will help, but for mine I just used the Starting Weapon and then created base equipment with an ability on it to use for the equipment template. This equips the player when they enter the game and they automatically get the ability.

It's been a while since I created it, but I think the Starting Weapon came with the framework I'm using. I believe Static Player Equipment will work the same, but I haven't tried it out.

Thanks for the help Phoebes.

I finally found the error, is seems like the script that spawns the asset must be in a network context. When spawning in a client context, only the player itself will see the ability animation and in a server context it will not be detected by the ability display.