I have a script that is attached to a prefab, this prefab is spawned in the game world 10 times. The script tells the objects to choose a target with the tag 'Stone' and there are about 400 stones in the world. The thing is, they all choose the exact same stone, how do I make them truly choose a random one?
Well, you have to select the target in Start() and do your move stuff in Update(). If you do that script above in update you will choose a new target every frame. If you do the whole thing just in Start() it will move a little bit and that's all. So split it after the Random.Range line.
Well, you have to select the target in
– Bunny83Start()and do your move stuff inUpdate(). If you do that script above in update you will choose a new target every frame. If you do the whole thing just in Start() it will move a little bit and that's all. So split it after theRandom.Rangeline.