How to use SetRelationshipToPlayer

Hi everyone,

I’m trying to setup a system in my mod where certain groups can be ghosted from one another instead of a player being ghosted to everyone and I’ve found the native SetRelationshipToPlayer
It seems to be what I want but it doesn’t appear to do anything?

I’ve seen that it’s client-side and my code is like this so far:

    local player = GetPlayerFromServerId(source)

    if(player == -1) then
        print("player not found")
        return -1
    end

    SetRelationshipToPlayer(player, true)

But Both players are still able to collide and interact with one another, I did try having both players call the same native for each other and even every frame as I know some natives require that but still nothing happens.

I know I can use SetLocalPlayerAsGhost() to do it globally but that’s not really what I wanted, I want a group to be able to join a race on the server and still collide with one another but have it so other players on the server are ghosted and can’t interfere.

Any help anyone can provide will be greatly appreciated!