#I have found what is causing the problem
1 messages · Page 1 of 1 (latest)
its not really a code its my weapon prefab
P250 is not working correctly somehow, AK47 is working perfectly.
when client tries to buy P250 it doesnt add it to their inventory also if host buys P250 before client joins it doesnt let them because of that error message
!code
📃 Large Code Blocks
Use links to services like:
https://paste.mod.gg/, https://hastebin.skyra.pw/, https://paste.ofcode.org/, https://paste.myst.rs/, https://scriptbin.xyz/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
A tool for sharing your source code with the world!
@limber fossil I believe this is everything if I missed something please ping me
@limber fossil I was debugging a little again and the mistake is somewhere between TryBuyWeapon and AddWeapon since when I try to add AK47 to wallbuy it also doesnt work
any luck Evilotaku?
UpdateWeaponActiveStates() is not going to run on the clients. I don't know if that are network objects, but if they are they need to be active at all times
after 2h I have gotten to point where Client spawns the gun but the gun doesnt get attached to him :/
the gun just Floats at 0/0/0
tho for some reason the clients HUD sees the gun and interacts with it which makes me even more confused
anyways I am going to sleep if you by any chance have any idea what could be the problem I'll try every single thing you recommend since I am just bad. Though I could make my first ever big project multiplayer I took bigger bite then I can chew
Network Object parenting can get a bit complicated
https://docs-multiplayer.unity3d.com/netcode/current/advanced-topics/networkobject-parenting/
A NetworkObject parenting solution within Netcode for GameObjects (Netcode) to help developers with synchronizing transform parent-child relationships of NetworkObject components.
I feel like the whole multiplayer is way more complicated then singleplayer
since you need to think about so many more things