How to make god mode button so u can't get hit by a glove

Hi i making game like slap battles and i need godmode button

What have you tried so far?

Post your code.

1 Like

we probably need your glove code so we know how it even affects the player

(most likely you can add a boolean onto the player character and then when the glove hits the player, it checks if the boolean is false, and only if it is false it runs the rest of the hitting script)

Its more like when you click button your avatar Collision is off and u can’t get hit

You could use CollectionService:AddTag to add a tag to the character model and use CollectionService:HasTag to check if the hit player model has a tag that makes them invincible from the code that handles hit detection.

Turn off the damage for that hit. In the damage script.

you can add a “invincibility” bool value inside of the character (by creating a value inside of startercharacterscripts) and inside the glove script make it so that it checks if the value is true or false if its true make it so that it doesn’t do anything but if its false you can make it so that the glove functions normally