# The server is never locally controlled?

**URL:** <https://forums.unrealengine.com/t/the-server-is-never-locally-controlled/366006>\
**Category:** Platform & Builds\
**Tags:** Steam, VR-Vive, unreal-engine, Multiplayer, question, Blueprint\
**Created:** [August 3, 2016, 3:45pm UTC](https://forums.unrealengine.com/t/the-server-is-never-locally-controlled/366006 "2016-08-03T15:45:10Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maynlie](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Maynlie](https://forums.unrealengine.com/u/Maynlie)\
**Post date:** [August 3, 2016, 3:45pm UTC](https://forums.unrealengine.com/t/the-server-is-never-locally-controlled/366006/1 "2016-08-03T15:45:10Z")

</div>

Hi guys,

I’m working on a multiplyer game for the VR Vive, so I followed tips from this site: [Project Artemis: UE4 Multiplayer VR](http://heliosinteractive.com/project-artemis-ue4-multiplayer-vr). But one part is failing.

 ![101250-blueprint.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/2/9/d2953b14a1a7ce122236156c137da3512369864f.png)

When the server (which is also a client) check the “IsLocallyControlled” node, he never returns true. So he never send his position to the other clients but can see them moving around. I figured this out threw severous logs and print string. Is it normal? Am I missing something? Thanks for the answers guys. Cheers.

---

<div class="post-metadata">

**Author:** ![Tobiw](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tobiw](https://forums.unrealengine.com/u/Tobiw)\
**Post date:** [March 16, 2017, 6:27pm UTC](https://forums.unrealengine.com/t/the-server-is-never-locally-controlled/366006/2 "2017-03-16T18:27:16Z")

</div>

did you maybe figure this one out? I have the same problem:

```
if (World)
{
    if (IsLocallyControlled()) {
    	GEngine->AddOnScreenDebugMessage(-1, 7, FColor::Blue, TEXT("spawn light success"));
    	NoctovisorLight = World->SpawnActor<AAlienLightHolder>(AAlienLightHolder::StaticClass(), GetActorLocation(), GetActorRotation());
    }
}

```

executes on owning clients but not if the server is the owner

---

<div class="post-metadata">

**Author:** ![ExtraLifeMatt](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/extralifematt/32/918695_2.png) [@ExtraLifeMatt](https://forums.unrealengine.com/u/ExtraLifeMatt)\
**Post date:** [March 16, 2017, 7:49pm UTC](https://forums.unrealengine.com/t/the-server-is-never-locally-controlled/366006/3 "2017-03-16T19:49:49Z")

</div>

You probably want

```
if ( HasAuthority() || IsLocallyControlled() )
```

---

<div class="post-metadata">

**Author:** ![Tobiw](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tobiw](https://forums.unrealengine.com/u/Tobiw)\
**Post date:** [March 16, 2017, 7:53pm UTC](https://forums.unrealengine.com/t/the-server-is-never-locally-controlled/366006/4 "2017-03-16T19:53:17Z")

</div>

no, in the case of a client calling this, the spawning would execute on both the client and the server since both of them pass the if statement

---

<div class="post-metadata">

**Author:** ![ExtraLifeMatt](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/extralifematt/32/918695_2.png) [@ExtraLifeMatt](https://forums.unrealengine.com/u/ExtraLifeMatt)\
**Post date:** [March 16, 2017, 9:15pm UTC](https://forums.unrealengine.com/t/the-server-is-never-locally-controlled/366006/5 "2017-03-16T21:15:22Z")

</div>

Ah, right. My mistake, what you want to check for is the NetMode and see if it’s the listen server as only the listen server can have a local client in addition to being the server.

```
if (GetNetMode() == ENetMode::NM_ListenServer || IsLocallyControlled() )
```

---

<div class="post-metadata">

**Author:** ![Tobiw](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tobiw](https://forums.unrealengine.com/u/Tobiw)\
**Post date:** [March 18, 2017, 3:06pm UTC](https://forums.unrealengine.com/t/the-server-is-never-locally-controlled/366006/6 "2017-03-18T15:06:11Z")

</div>

Unfortunately this produces the same effect as your previous proposition. I want the code to execute only on the calling controller. With this, if the client calls, the server AND the client execute it.

---

<div class="post-metadata">

**Author:** ![Tobiw](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Tobiw](https://forums.unrealengine.com/u/Tobiw)\
**Post date:** [March 22, 2017, 8:39pm UTC](https://forums.unrealengine.com/t/the-server-is-never-locally-controlled/366006/7 "2017-03-22T20:39:35Z")

</div>

Ok so after hours of fighting i figured it out. You just can’t call this function on beginPlay, apparently the server needs some time to connect the player controllers, so just do it after a delay

---

<div class="post-metadata">

**Author:** ![Bdissa](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Bdissa](https://forums.unrealengine.com/u/Bdissa)\
**Post date:** [April 10, 2025, 7:29pm UTC](https://forums.unrealengine.com/t/the-server-is-never-locally-controlled/366006/8 "2025-04-10T19:29:31Z")

</div>

Thank you for this, I have been stuck on this for hours trying to figure out why “IsLocallyControlled” works everywhere else. Now I know it is because it is BeginPlay.

8 years later, you are still helping people out lol
