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
 

Help with teleport script

Previous Thread :: Next Thread 
FreezingIceDragon is not online. FreezingIceDragon
Joined: 24 Jul 2011
Total Posts: 91
06 Jul 2012 01:01 PM
local admins = {"FreezingIceDragon"}

function OnPlayerChatted(speaker, msg)
end
msg = string.lower(msg)
for i = 1,#admins do
if speaker.Name == admins[i] then
if msg == "tele/all/gunfight1" then
p = game.Players:GetChildren()
for i = 1,#p do
p[i].Character.Torso.Position = Vector3.new(236, 18, 196)
end
end
end
end

function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg)
OnPlayerChatted(newPlayer, msg)
end)
end

game.Players.PlayerAdded:connect(onPlayerEntered)

What's wrong with it?
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
06 Jul 2012 01:06 PM
[ Content Deleted ]
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
06 Jul 2012 01:07 PM
[ Content Deleted ]
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
06 Jul 2012 01:09 PM
permission = {"FreezingIceDragon"}

function checkOkToLetIn(name)
    for i = 1,#permission do
        -- convert strings to all upper case, otherwise we will let in
        -- "Username" but not "username" or "uSERNAME"
        if (string.upper(name) == string.upper(permission[i])) then return true end
    end
    return false
end

function OnPlayerChatted(speaker, msg)
msg = string.lower(msg)
if checkOkToLetIn(speaker.Name) then
if msg == "tele/all/gunfight1" then
p = game.Players:GetChildren()
for i = 1,#p do
p[i].Character.Torso.Position = Vector3.new(236, 18, 196)
end
end
end
end

function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg)
OnPlayerChatted(newPlayer, msg)
end)
end
game.Players.PlayerAdded:connect(onPlayerEntered)

- Striked
Report Abuse
FreezingIceDragon is not online. FreezingIceDragon
Joined: 24 Jul 2011
Total Posts: 91
06 Jul 2012 01:15 PM
How do I bring my whole body there WITHOUT killing me...
Report Abuse
LordStriked is not online. LordStriked
Joined: 19 Mar 2011
Total Posts: 5396
06 Jul 2012 01:19 PM
p[i].Character:MoveTo(Vector3.new(236, 18, 196))

- Striked
Report Abuse
FreezingIceDragon is not online. FreezingIceDragon
Joined: 24 Jul 2011
Total Posts: 91
06 Jul 2012 01:23 PM
Thx alot.
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