#Disable collision of primitive only to some players
1 messages · Page 1 of 1 (latest)
you need to use fake sync vars
also, you'll have to disable the collider on the server
var prim = Primitive.Create(p.Position);
prim.GameObject.AddComponent<PropComponent>();
prim.Collidable = false;
Timing.CallDelayed(0.5f, () =>
{
p.SendFakeSyncVar(prim.Base.netIdentity, typeof(PrimitiveObjectToy), nameof(PrimitiveObjectToy.PrimitiveFlags), PrimitiveFlags.Collidable | PrimitiveFlags.Visible);
});
i mean i tried to use exiled one but seems that doesnt work
[2025-12-11 21:31:24.409 +03:00] [STDOUT] KeyNotFoundException: The given key 'PrimitiveObjectToy.PrimitiveFlags' was not present in the dictionary.
[2025-12-11 21:31:24.409 +03:00] [STDOUT] at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <13c0c460649d4ce49f991e2c222fa635>:0
[2025-12-11 21:31:24.410 +03:00] [STDOUT] at System.Collections.ObjectModel.ReadOnlyDictionary`2[TKey,TValue].get_Item (TKey key) [0x00000] in <13c0c460649d4ce49f991e2c222fa635>:0
[2025-12-11 21:31:24.410 +03:00] [STDOUT] at Exiled.API.Extensions.MirrorExtensions+<>c__DisplayClass48_0`1[T].<SendFakeSyncVar>g__CustomSyncVarGenerator|0 (Mirror.NetworkWriter targetWriter) [0x0005b] in <ff8b8b81507c43fb9fbb6a8f9722441a>:0
[2025-12-11 21:31:24.411 +03:00] [STDOUT] at Exiled.API.Extensions.MirrorExtensions.MakeCustomSyncWriter (Mirror.NetworkIdentity behaviorOwner, System.Type targetType, System.Action`1[T] customSyncObject, System.Action`1[T] customSyncVar, Mirror.NetworkWriter owner, Mirror.NetworkWriter observer) [0x000c5] in <ff8b8b81507c43fb9fbb6a8f9722441a>:0
[2025-12-11 21:31:24.411 +03:00] [STDOUT] at Exiled.API.Extensions.MirrorExtensions.SendFakeSyncVar[T] (Exiled.API.Features.Player target, Mirror.NetworkIdentity behaviorOwner, System.Type targetType, System.String propertyName, T value) [0x0003a] in <ff8b8b81507c43fb9fbb6a8f9722441a>:0
ye
use the fake sync provided by https://github.com/KadavasKingdom/LabApiExtensions
GitHub
Extensions, helper classes for LabApi. Contribute to KadavasKingdom/LabApiExtensions development by creating an account on GitHub.
thanks
np
No clue what the hell is up with Exiled's fake sync
I use a basic one I ripped from @leaden current and it's never failed
And apparently it's what Exiled used to use
Which is odd I don't know why they would change it if it works