FortniteCharacter.Hide() is hiding VFX aswell

I’m working on a verse script that hides the player’s character and attaches a Niagara System using a VFX powerup device. But when calling the function FortniteCharacter.Hide(), children to the player’s character also get hidden, so the Niagara System also becomes invisible.

Goal: Have a Niagara System attached to the invisible player

Discarded Solutions:

  • Unparent the Niagara System from the player and make it follow said player with Verse:

That is not possible with my setup since it depends on the parent’s bone sockets.

  • Hide the player with an Orbit Camera’s deviceHide Player Chacarter” option:

This is only local and also hides the VFX (Niagara System), so it can not be used.

Questions:

  • Are there any work arounds for this?
  • Is there more to FortniteCharacter.Hide() i might be missing?
  • If not, will there be an update to the function that allows programmers to choose between hiding or not said components/children?

Hey @xophr how are you?

I think the best approach for this is to attach the niagara to an invisible prop, which follows the player instead of being attached to it.

This way you will be able to hide the player but the prop will keep following it, hace the niagara vfx will be visible, as it is not attached directly to the player.

To attach a prop to the player you can use something like this:

    # Continuously moves the CustomProp to follow the player
    FollowPlayer(Agent:agent)<suspends>:void=
        if(FortChar := Agent.GetFortCharacter[]):
            loop:
                # Stop following if the CustomProp is no longer attached
                if(IsAttached = false):
                    break

                Sleep(0.0)

                # Match the CustomProp position and rotation to the player
                PlayerPos := FortChar.GetTransform().Translation
                PlayerRot := FortChar.GetTransform().Rotation
                CustomProp.MoveTo(PlayerPos, PlayerRot, 0.1)

Hope this helps you!