Spectating system not working

Hey! I’m making a spectator system for my online multiplayer game and it basically don’t works and i don’t know why.

Screenshots:

“Current Player” variable must be less than the Players Alive Last Index but it’s not
Capture001

Logs

Blueprints:

Game State
Capture001

Third Person Character BeginPlay
Capture001

BP_Spectator “Pawn”

Spectate Button Widget

Spectating Widget
Capture001

Also if anyone is wondering, i tried using other spectating blueprints, watching tutorials, and replacing the PlayersAlive array with “Get All Actors Of Class” but nothing worked.

Thanks in advance! <3

bumping this…

bumping this…

Do not add 1 there

image

Thanks for your answer! This solves the first screenshot issue. But still when i press the buttons to change between players it does nothing. This is how everything looks ingame.

Can you try using PlayerController->SetViewTarget to spectate target pawn, rather than setting location and rotation of spectator pawn

It works now! But there’s still a problem. I have 3 players and the spectator can only spectate itself and to another player. I think the issue is that the 3rd player doesnt add to the alive players array. How can i fix this?

bumping this…

bumping this.

bumping this…

bumping this…

bumping this…

bumping this…

Hi, did you find a solution?