Parent Objects

How to make parented objects through code during the game ?

I want to Learn this because I want when I collides with the gun…the gun gets parented with the player

so the gun can be always with me :slight_smile:

thanks for supporting !

GUNgameObject.transform.parent = PLAYERgameObject
1 Like

That should be PLAYERgameObject.transfrom

2 Likes