generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Teleport to position via Command

Previous Thread :: Next Thread 
Supah is not online. Supah
Joined: 16 Aug 2008
Total Posts: 921
14 Dec 2012 09:02 PM
Seat1.Position = Vector3.new(9,21.5,-5)
Seat2.Position = Vector3.new(11,21.5,-5)
SeatPart2.Position = Vector3.new(7.5,21.5,-5)
SeatPart3.Position = Vector3.new(12.5,21.5,-5)
SeatPart4.Position = Vector3.new(-10,22.5,6.5)
Floor.Position = Vector3.new(0,20,5)
Roofzz.Position = Vector3.new(0,39,5)
Wall1.Position = Vector3.new(19.5,29.5,5)
Wall2.Position = Vector3.new(-19.5,29.5,5)
Wall3.Position = Vector3.new(0,29.5,24.5)
Wall4.Position = Vector3.new(12.5,29.5,-14.5)
Wall5.Position = Vector3.new(-12.5,29.5,-14.5)
Path.Position = Vector3.new(0,11.5,-22.5)
Door.Position = Vector3.new(0,29.5,-14.5)
--These are the locations of the bricks of the house I made. I need it to when I say "bring name" it brings the player "name" inside the area i've made, preferrably using string.lower(msg) if possible.
~What's green and has wheels? Grass, I've lied about the wheels.~
Report Abuse
jelly134 is not online. jelly134
Joined: 25 Aug 2008
Total Posts: 1137
15 Dec 2012 03:36 AM
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
onChat(msg,player)
end) end)

function onChat(msg,sender)
msg = string.lower(msg)
if string.sub(msg,1,5) == "bring" then
name = string.sub(msg,7,10)
players = game.Players:GetChildren()
for i=1, #players do
if string.lower(players[i].Name) == name then
player = players[i]
break
end end
if player then if player.Character then
player.Character.Torso.CFrame = CFrame.new(pos)
end end end end

--These are the basics you need. Where it teleports them to pos, you need to set pos as the position you want them to go to.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image