- Home /
Grappling Gun bugs with other weapons
As soon as I grapple to something and change to my melee weapon, my melee weapon becomes the grappler, which shouldn't make sense, because only the grappling gun should be able to grapple to something. How am I able to fix it, so as soon as I switch to my melee weapon, I am not grappeling anymore.
Answer by $$anonymous$$ · Dec 10, 2020 at 05:09 AM
Just use this function
1.public GameObject gameobject;
gameobject.SetActive(false);
Answer by logicandchaos · Dec 10, 2020 at 12:14 PM
Can't really say without see your code, no one knows how your grappler works, how it's turned on or off.. I can't give you any detailed answer. But what you could try is disabling the grappler when you switch weapons, like call a method or make an event, maybe a bool, isGrapping, then when you switch weapons you set it to false. I mean it's hard to make any answer with no data.
Your answer
Follow this Question
Related Questions
Simple Shoot script 3 Answers
Character too floaty after jumping and grappling.,Grapple too floaty 0 Answers
3D Grappling Hook Detect Line of Sight Broken 0 Answers
Unity 2D Grapple hook problems 1 Answer