- Home /
Getting a Gameobject with a tag
Hello, im currently making a multiplayer game and have ran into some issues,
Im making a teleporter right now and I can make a single game object get teleported,
But because I have a character creator it renames the "Player" to the chosen name,
Im trying to figure out how to allow anyone with the "Player" tag and/or layer as a GameObject that can be teleported.
Answer by codybrenner103 · Oct 25, 2017 at 07:02 PM
Awesome thanks for your input second question is there a way to teleport any game object that collides with it? @TSI25
you just want to call
gameObjectInQuestion.transform.position = teleportTarget;
where teleport target is a vector3 that describes where you want the object to teleport to.
Answer by TSI25 · Oct 25, 2017 at 06:55 PM
you can get gameobjects in the scene with a particular tag by calling FindGameObjectsWithTag but its not really the most efficient way to get those objects.
Your answer
![](https://koobas.hobune.stream/wayback/20220612141834im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Homing Missile target with "Find Objects With Tag" not working? 2 Answers
Activate/deactivate all GameObjects with same tag c# 1 Answer
Do something only "for" Gameobjects in trigger 1 Answer
Counting GameObjects with Tag (Int) 1 Answer
Make a game object in a scene into a prefab with script 1 Answer