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
 

Re: Teleportation

Previous Thread :: Next Thread 
InfinityRacer is not online. InfinityRacer
Joined: 25 Oct 2013
Total Posts: 51
21 Dec 2013 02:41 PM
I want a script so that when someone says a specific command it tp's them to a certain spot, but when they say it all their tools are removed, if you can help I would be extremely grateful!
Report Abuse
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
21 Dec 2013 03:32 PM
Tools are removed? Use the position and change it by using the MoveTo().

Here's example:
1 game.Workspace.Player1:MoveTo(game.Workspace.CertainSpot.Position)

or

1 game.Workspace.Player1.Torso.CFrame = Vector3.new(game.Workspace.CertainSpot.Position) + Vector3.new(0,2,0)

Without + Vector3.new(0,2,0) could stick the player on the floor.
For example if you don't have + Vector3.new(0,2,0):
1 game.Workspace.Player1.Torso.CFrame = Vector3.new(game.Workspace.CertainSpot.Position) -- Not solved Errors, if you don't have CFrame.new, Still not solved Sticks the player on the floor if by using CFrame.new

Reply me if still have errors.
Report Abuse
qrrrq is not online. qrrrq
Joined: 27 Jan 2013
Total Posts: 1252
21 Dec 2013 03:34 PM
You can't use CFrame and then Vector...
Report Abuse
wubbzy301 is not online. wubbzy301
Joined: 15 May 2010
Total Posts: 1188
21 Dec 2013 03:36 PM
CFrame and then Vector3.new + Vector3.new are solving the errors,
CFrame and then Vector3.new are not solved the errors, Use CFrame and then CFrame.new
Report Abuse
qrrrq is not online. qrrrq
Joined: 27 Jan 2013
Total Posts: 1252
21 Dec 2013 03:38 PM
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(msg)
if msg == 'yoloswag' then -- change yoloswag to the command
player.Character.CFrame = CFrame.new(0,0,0) --Change 0,0,0 to the position you want
player.Backpack:ClearAllChildren()
end
end)
end)
Report Abuse
InfinityRacer is not online. InfinityRacer
Joined: 25 Oct 2013
Total Posts: 51
21 Dec 2013 03:58 PM
Thanks qrrrq this works for me :)
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