SpectatableModuleBase doesn't have a owner

Version: 14.1.4

Branch: Release (stable) branch

Timestamp: 2025/09/25 19:44:08

Server Name: Private Server

Description

InvalidOperationException: SpectatableModuleBase of name 'ScientistRole(Clone)' does not have an owner!

at PlayerRoles.Spectating.SpectatableModuleBase.get_TargetHub () [0x00000] in <00000000000000000000000000000000>:0

at PlayerRoles.Spectating.SpectatableListManager.TryGetNextTargetId (System.Boolean prevKeyDown, System.Boolean nextKeyDown, System.Int32& nextId) [0x00000] in <00000000000000000000000000000000>:0

at PlayerRoles.Spectating.SpectatableListManager.NextTarget () [0x00000] in <00000000000000000000000000000000>:0

at PlayerRoles.Spectating.SpectatorRole.Update () [0x00000] in <00000000000000000000000000000000>:0

Client throws this error forever

Steps to reproduce

I used a plugin to recreate the issue using this code. It needs to be done on player dying

Timing.CallDelayed(2.0f, () =>

        {

                       player.SetRole(RoleTypeId.Scientist, RoleChangeReason.None, RoleSpawnFlags.None);

        }

It seems by spawning

What is supposed to happen

No error

What actually happens

Error

Attachments

Edited by Crimson