Glargoe Posted June 2, 2024 Share Posted June 2, 2024 Hello, I am creating a client-side mod that adds different on-hit effects to weapons. For example, attacking with a spear makes a particle effect. The mod works fine on my own world, but when I crash when I join a public world. I think this is because `inst.components.weapon` is not accessible by the client (when I print `inst.components`, I don't see weapon). Is there a way to fix this? Or is there another method I can use? I would prefer to keep the mod client-side as it is just a cosmetic mod. local function SpearEffects(inst, attacker, target) inst.components.weapon:SetOnAttack(function(inst, attacker, target) -- code for the effects end) end AddPrefabPostInit("spear", SpearEffects) Link to comment https://forums.kleientertainment.com/forums/topic/156481-help-client-side-mod-breaks-when-joining-a-server/ Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now