Ryux33
(Ryux33)
May 20, 2024, 12:20pm
1
Im working on an FPS Game and im trying to attach a weapon bp to my players, on server side it works correctly. Here everyone has their weapons, but the client sees no weapon on any player character. im working with a repnotify variable but strangely it doesnt work on the client.
here it shows that the client sees nothing and the server sees eevrything correctly
On Becoming a Viewtarget i call my function with two weapon classes to attach and spawn weapons for every character, the function gets called on serverside
Internal Function gets called
hers my code to attach my primary weapon which then gets saved as PrimaryWeapon variable which is set to RepNotify
i print a text to see who gets notified by the changed variable
only server sees the change
Auran131
(Auran13)
May 21, 2024, 3:28am
2
The Actor you spawn needs to be set to replicated too
1 Like
Ryux33
(Ryux33)
May 23, 2024, 4:12pm
3
Thanks that helped but my weapon just floats around now on client side
Ryux33
(Ryux33)
May 24, 2024, 2:31pm
5
yeah i call an attachweapon function on the server
Auran131
(Auran13)
May 24, 2024, 2:41pm
6
change keep relative to snap to target
Ryux33
(Ryux33)
May 24, 2024, 5:22pm
7
does nothing except rotating the weapon actor, this is how it looks with âkeep relativeâ on client and server. server is on the left.
Auran131
(Auran13)
May 25, 2024, 4:50am
8
hmm, that should work, i wonder if its because you may have them set to âonlyrelevanttoownerâ and/or âonlyownerseeâ
Ryux33
(Ryux33)
May 26, 2024, 9:23am
9
the client got invalid meshes to attach the weapon to, got it fixed
system
(system)
Closed
June 25, 2024, 9:23am
10
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.