Multicasting not working for Gameplay Abilities



I have tried playing with the gameplay ability system for my game and have primarily used the blueprint class Gameplay Ability. I tried making a simple ball shooting ability which worked perfectly. The problem is that my game is in multiplayer. When I use the ability on the server, it is completely fine (the ball object is replicated) but when I use it on the client, both the server and the client shoot one ball each and neither see the other person’s ball. I give the ability in a UI and use a BPI to add it with multicast like you can see on the picture. I also tried multicast for the ability usage, but it was the same. I tried the ability inside the BP_FirstPersonCharacter, and it worked fine. My game would greatly benefit from what GAS gives, so I would be sincerely grateful for help.

First of all why multicast? Secondly you have failed to say if this player or AI.

Abilities must be granted on server
Abilities must be activated by server or local player (if ability is local only/locally predicted).

Multicast is wrong here, why are you multicasting? I would read up on some networking basics!

One issue your facing here is a race condition, and using multicast unneeded.
Pressing E grants the ability (Why can’t the ability be pre-granted?)
Cause Pressing E should just activate the ability.

You dont need to grant an ability when you need to use it, you can keep it pre-granted.

So my suggestion is:
BeginPlay behind Has Authority gate, grant the ability.
Pressing E just calls TryActiveAbility!
No need for RPCs or anything for something trivial.

Secondly: Dont use SpawnActor default node (unless you want the ball to both exist locally and on server, not connected, not replicated. Only server can spawn a replicated actor!

If this is the case, then mark the ability as Server Only and have the client send a server RPC to tell the server to activate the ability or gate your ability as appropriate (Authority → SPawn Actor) and for the client do End Ability Locally (to avoid cancelling the server).

Thank you!
The answer to why I was using multicast was because I am very new to Unreal engine and programming in general and all the tutorials I followed used it. I am sorry I didn’t say in my initial message if it was AI or another client and how I was doing with giving the ability. To answer those questions I want this to be a client and the ability is granted by pressing the button in a UI and not by pressing E. The UI sends a Blueprint interface with the data of which ability it is and runs the code on the left in the picture iIfirst sent. I have started to fix the problem whit that only the server can spawn connected and replicated objects (thanks a lot I didn’t know that) but I have run into the problem that I don’t know how to make the server spawn the actor in on the client’s place, I searched around but couldn’t find how. Thanks a lot for the help so far!