I tried:
game.Workspace.Player.Torso.Position = Vector3.new(-165.91, 1331.55, 302.289)
but it doesn't teleport the player there.
Second Question,
I have a Gui that gives the player the ability to choose their team (This would compare with my first question) that he/she choose. So say the player choose Team Red from a Gui, and it would teleport the player to the Red Team Spawn Location so I did this for something:
if game.StarterGui.GunPicker.NameOfGuns.For_PrimaryFrame.Gun_Name_Of_Pick.Text == '---' then DeployButton.Visible = false end
Don't worry about the stuff inside the if then statement.
So in the Outlook it said that NameOfGuns is not a valid member of ScreenGui One, the name of the Gui in it (NameOfGuns Parent) is not ScreenGui
So if anyone can help me with this problem I would be happy, thanks!
First off all, for teleportation, you'll have to use CFrame
instead of Position
function TriggerTP(Player) Player.Character.Torso.CFrame = CFrame.new(x,y,z) end
For your second question, You shouldn't change gui's in StarterGui
, but in Players.PLAYER.PlayerGui
StarterGui is the gui that gets given to a player when he/she joins the place / resets (on respawn).
Please add more code for us to solve your second question. (Or put it in a different question.)