Event executed on server not replicating

I have a setup where you press f, it draws a line trace, then sends a generic “interact” event to that object with the interacting player ref, as seen here

Here is the button’s code

When set to run on server, nothing works for the client. When set to multicast, only setting the control rotation works for the client. All conditions work for the server.

Why is nothing triggering the set location for the client? I need the button to teleport the client and I want the code inside the button, not in the player character. What is the proper way to achieve this?

you need to pass the HitActor variable to the server.

to do that drag from Interact Target to the Red node, this will create a pin, then drag the OutHitActor to the blue function

1 Like


Do you mean like this? This produces it working for the server, and only setting the control rotation for the client.

try SetActorLocation directly off the InteractingPlayer, (you dont need the root component)

Also make sure the player actor replicates movement or change it to a multicast inside the interact event depending on how your game works.

control rotation is the direction the player/camera is facing not the actor so whats your intended result here?

I use control rotation to control the direction that the character is facing, so my intended result is for the player to press the button, and be teleported to a specified location and facing a specified direction


Using this with multicast only changes the control rotation, not the location

I also need to set the scene component location for my games purposes, but that shouldn’t be why I’m experiencing issues as it doesn’t work with set actor location either.

the scene/root location is a child of the actor so that’s already set.

youre saying SetLocation doesnt work? is your actor replicated and replicating movement? keep in mind if you’re using the character movement component that may conflict but im pretty sure it has an inbuilt teleport function so try that?

also remember now the interact function is happening on the server so you may need to set control rotation on the OwningClient

My actor is replicating movement, I’m using the character movement component, and set actor location or set scene component location does not work. Using the teleport node does nothing, even on the server. Setting control rotation is the only part of this that’s actually working lol.

cant see any reason it wouldnt work, just to state the obvious, you’re not already at 0,0,0 are you?

also make sure Interact is only RunOnServer (you had it at multicast in your pic above)

hit F9 on SetControlRotation to create a breakpoint and then check the values by hovering your mouse over them.

I am definitely not at 0,0,0, I tested in both multicast and run on server and neither worked, but now using runonserver causes my editor to crash as soon as I interact with the button on the client, but it works for the server. edit: I crashed it 10+ times trying to figure out why, so this is definitely the cause btw

Character

Button (pilotchair in the output log)

Here is the crash log.

Crash Log

Assertion failed: NetGUID.IsDynamic() [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PackageMapClient.cpp] [Line: 2289]
Non-stably named object PilotChair_C /Memory/UEDPIE_1_6X4ZPXPMBPU3J8BV4NGP5XUYN.TestLevel:PersistentLevel.PilotChair_GEN_VARIABLE_PilotChair_C_CAT_UAID_2800AF4A5FCAB91802_1283472399 has static NetGUID [31]. [UNetConnection] RemoteAddr: 127.0.0.1:17777, Name: IpConnection_0, Driver: Name:GameNetDriver Def:GameNetDriver IpNetDriver_1, IsServer: NO, PC: BP_FirstPersonPlayerController_C_0, Owner: BP_FirstPersonPlayerController_C_0, UniqueId: NULL:Nick_Laptop2024-ABAB338940874440A4B92F94082B5F3E

0x00007ff91e2fd791 UnrealEditor-Engine.dll!UPackageMapClient::ShouldSendFullPath() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PackageMapClient.cpp:2289]
0x00007ff91e2f9d7f UnrealEditor-Engine.dll!UPackageMapClient::SerializeObject() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PackageMapClient.cpp:324]
0x00007ff9282f2725 UnrealEditor-CoreUObject.dll!FObjectPropertyBase::NetSerializeItem() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\PropertyBaseObject.cpp:135]
0x00007ff91e8b53cd UnrealEditor-Engine.dll!FRepLayout::SerializeProperties_r() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\RepLayout.cpp:6659]
0x00007ff91e8adaa2 UnrealEditor-Engine.dll!FRepLayout::SendPropertiesForRPC() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\RepLayout.cpp:6965]
0x00007ff91e22a9f4 UnrealEditor-Engine.dll!UNetDriver::ProcessRemoteFunctionForChannelPrivate() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\NetDriver.cpp:2736]
0x00007ff91e217ee3 UnrealEditor-Engine.dll!UNetDriver::InternalProcessRemoteFunctionPrivate() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\NetDriver.cpp:2557]
0x00007ff91e2177bb UnrealEditor-Engine.dll!UNetDriver::InternalProcessRemoteFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\NetDriver.cpp:2459]
0x00007ff91e229718 UnrealEditor-Engine.dll!UNetDriver::ProcessRemoteFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\NetDriver.cpp:7555]
0x00007ff91cc6b689 UnrealEditor-Engine.dll!AActor::CallRemoteFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:5068]
0x00007ff9283bb2bb UnrealEditor-CoreUObject.dll!UObject::ProcessInternal() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1301]
0x00007ff92838d65d UnrealEditor-CoreUObject.dll!ProcessScriptFunction<void (__cdecl*)(UObject *,FFrame &,void )>() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1039]
0x00007ff9283a3404 UnrealEditor-CoreUObject.dll!UObject::CallFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1149]
0x00007ff9283bc368 UnrealEditor-CoreUObject.dll!ProcessLocalScriptFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1206]
0x00007ff92838d65d UnrealEditor-CoreUObject.dll!ProcessScriptFunction<void (__cdecl
)(UObject *,FFrame &,void *)>() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1039]
0x00007ff9283bbdb4 UnrealEditor-CoreUObject.dll!ProcessLocalFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1276]
0x00007ff9283bc368 UnrealEditor-CoreUObject.dll!ProcessLocalScriptFunction() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1206]
0x00007ff9283bb2cf UnrealEditor-CoreUObject.dll!UObject::ProcessInternal() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:1304]
0x00007ff9280504c2 UnrealEditor-CoreUObject.dll!UFunction::Invoke() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Class.cpp:6847]
0x00007ff9283b9■■■ UnrealEditor-CoreUObject.dll!UObject::ProcessEvent() [D:\build++UE5\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\ScriptCore.cpp:2144]
0x00007ff91ccbffc7 UnrealEditor-Engine.dll!AActor::ProcessEvent() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:1092]
0x0000027116911543 UnrealEditor-EnhancedInput.dll!TScriptDelegate::ProcessDelegate() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\UObject\ScriptDelegates.h:448]
0x0000027116926b43 UnrealEditor-EnhancedInput.dll!FEnhancedInputActionEventDelegateBinding::Execute() [D:\build++UE5\Sync\Engine\Plugins\EnhancedInput\Source\EnhancedInput\Public\EnhancedInputComponent.h:322]
0x0000027116961f13 UnrealEditor-EnhancedInput.dll!UEnhancedPlayerInput::EvaluateInputDelegates() [D:\build++UE5\Sync\Engine\Plugins\EnhancedInput\Source\EnhancedInput\Private\EnhancedPlayerInput.cpp:603]
0x00007ff91f027337 UnrealEditor-Engine.dll!UPlayerInput::ProcessInputStack() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\UserInterface\PlayerInput.cpp:1149]
0x00007ff91e68b279 UnrealEditor-Engine.dll!APlayerController::ProcessPlayerInput() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:2738]
0x00007ff91e6a9c7e UnrealEditor-Engine.dll!APlayerController::TickPlayerInput() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:5035]
0x00007ff91e686117 UnrealEditor-Engine.dll!APlayerController::PlayerTick() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:2342]
0x00007ff91e6a74fb UnrealEditor-Engine.dll!APlayerController::TickActor() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\PlayerController.cpp:5194]
0x00007ff91cc8a5e6 UnrealEditor-Engine.dll!FActorTickFunction::ExecuteTick() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\Actor.cpp:238]
0x00007ff91ee9b5fb UnrealEditor-Engine.dll!FTickFunctionTask::DoTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:278]
0x00007ff91eebc5b5 UnrealEditor-Engine.dll!TGraphTask::ExecuteTask() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Async\TaskGraphInterfaces.h:1235]
0x00007ff925dbb88a UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:760]
0x00007ff925dbbf2e UnrealEditor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:651]
0x00007ff925dc88de UnrealEditor-Core.dll!FTaskGraphCompatibilityImplementation::WaitUntilTasksComplete() [D:\build++UE5\Sync\Engine\Source\Runtime\Core\Private\Async\TaskGraph.cpp:2122]
0x00007ff91ef24b7f UnrealEditor-Engine.dll!FTickTaskSequencer::ReleaseTickGroup() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:556]
0x00007ff91ef3551b UnrealEditor-Engine.dll!FTickTaskManager::RunTickGroup() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\TickTaskManager.cpp:1583]
0x00007ff91ddcef0f UnrealEditor-Engine.dll!UWorld::RunTickGroup() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:772]
0x00007ff91dddd7ec UnrealEditor-Engine.dll!UWorld::Tick() [D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\LevelTick.cpp:1499]
0x00007ff922f1cffd UnrealEditor-UnrealEd.dll!UEditorEngine::Tick() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\EditorEngine.cpp:2015]
0x00007ff923b9f6b6 UnrealEditor-UnrealEd.dll!UUnrealEdEngine::Tick() [D:\build++UE5\Sync\Engine\Source\Editor\UnrealEd\Private\UnrealEdEngine.cpp:550]
0x00007ff7bb4c8e0b UnrealEditor.exe!FEngineLoop::Tick() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\LaunchEngineLoop.cpp:5921]
0x00007ff7bb4ee33c UnrealEditor.exe!GuardedMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Launch.cpp:180]
0x00007ff7bb4ee42a UnrealEditor.exe!GuardedMainWrapper() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:118]
0x00007ff7bb4f18a4 UnrealEditor.exe!LaunchWindowsStartup() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:258]
0x00007ff7bb5070c4 UnrealEditor.exe!WinMain() [D:\build++UE5\Sync\Engine\Source\Runtime\Launch\Private\Windows\LaunchWindows.cpp:298]
0x00007ff7bb50a37a UnrealEditor.exe!__scrt_common_main_seh() [D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288]
0x00007ff9f505257d KERNEL32.DLL!UnknownFunction

so that seems to me the object ‘Chair’ exists on the client but not the server, or at least they have separate instances which they shouldn’t.

so make sure the chair is spawned by the server and is replicated also

1 Like

How would I do this? I just dropped it in the world in editor. I’ve already ticked replicates and always relevant under advanced.

Actually, I’ve been messing with this so long I forgot the chair is a child of another actor. Do you know what is causing this and how to get it working while being a child actor? Some relevant info is I am using the smooth sync plugin with the parent of the chair.

Edit: It does work when I drop in a new chair that is not a child, just weird that it doesn’t work as a child to me.

again the child needs to be replicated and set by the server, although i’ve heard in the past there are problems with child actors.

do you need to do it this way? seems to be we finally found the source of the problem

just to clarify when i say child, i mean the child actor component inside the other actor should be replicated too, although i’ve not done it this way myself so im getting outside my experience.

Thank you very much for helping me get to the source of the problem, I really appreciate it.

Here’s the replication settings of the chair inside the parent ship, which is also set to replicate.

Using child actors best solution I could come up with. I have a chair inside a space ship that has it’s own gravity, also a button that teleports players onto and off the ship, I’m unaware of any other way to achieve this than using child actors personally.

1 Like

as long as it works now its ok :slight_smile:

good luck

Unfortunately it’s still crashing :cry:

You’ve gone above and beyond though so I’ll mark as solved with the initial answer to my question.

i think whats happening is the client has its own chair, so when it sends to the server ‘interact with this actor’ that actor doesn’t exist on the server hence crash.

try clearing the child actor and setting it on begin play server only.

alternatively instead of using a child actor you can spawn actor and attach it on server, or you can spawn a collision volume around the chair that handles the interaction.

1 Like

So I decided to just skip child actors all together, is this the correct method of spawning and attaching? The execute pin is off begin play. Last question, thanks for all your help :slight_smile:

looks right but remember only spawn on server so if its on BeginPlay put a SwitchHasAuthority before it.

it also may be better on the construction script so you can see it in editor

all that said though, this could be a bit awkward to place and position, try using box collisions, just put them over your chair, set them to block your interact trace channel and that’ll give you a transform to teleport too.

again ive not done this myself yet so just throwing out ideas

1 Like