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 » Scripters
Home Search
 

Re: How would I teleport players?

Previous Thread :: Next Thread 
ShadowAley is not online. ShadowAley
Joined: 23 Jun 2010
Total Posts: 4823
20 Feb 2015 09:17 PM
All players, not just one to a brick location..?
Report Abuse
XToonLinkX123 is not online. XToonLinkX123
Joined: 24 Nov 2013
Total Posts: 74
20 Feb 2015 09:21 PM
I though..

for i,v in pairs(game.Players:GetChildren())do
v.Character:MoveTo(game.Workspace.BasePlate.Position + Vector3.new(0, math.random(1, 10) ,math.random(-10, 10)))
end
Report Abuse
ShadowAley is not online. ShadowAley
Joined: 23 Jun 2010
Total Posts: 4823
20 Feb 2015 09:22 PM
local lobby = game.Workspace:WaitForChild("Lobby")
local obbylist = game.ServerStorage:WaitForChild("Folder")
local msg = Instance.new("Message", workspace)


while true do
wait(5)
msg.Text = "Choosing Map"
wait(5)
local obbychoice = math.random(1, 1)
msg.Text = "Map Chosen!"
if obbychoice == 1 then
wait(3)
msg.Text = "Loading Map: Obby1"
wait(3)
msg:remove()
obbylist.Obby1:clone().Parent = game.Workspace
local teleport = game.Workspace.Obby1.PlayerTeleportPos
for i,v in pairs(game.Players:GetChildren()) do
v.Character:MoveTo(teleport)
end
end
end


this isn't working..?
Report Abuse
LeitrisArcade is not online. LeitrisArcade
Joined: 15 May 2010
Total Posts: 2127
20 Feb 2015 09:25 PM
any errors in output?

also I'm not sure if you can write it either way or not, but I always wrote ":clone()" as ":Clone()"

( ͡ಠ ͜ʖಠ)
Report Abuse
ShadowAley is not online. ShadowAley
Joined: 23 Jun 2010
Total Posts: 4823
20 Feb 2015 09:26 PM
21:26:15.239 - Unable to cast Instance to Vector3

PlayerTeleportPos is just a part in the model
Report Abuse
LeitrisArcade is not online. LeitrisArcade
Joined: 15 May 2010
Total Posts: 2127
20 Feb 2015 09:28 PM
try this then

local teleport = game.Workspace.Obby1.PlayerTeleportPos.Position
for i,v in pairs(game.Players:GetChildren()) do
v.Character.Torso.CFrame = CFrame.new(teleport)
end

( ͡ಠ ͜ʖಠ)
Report Abuse
ShadowAley is not online. ShadowAley
Joined: 23 Jun 2010
Total Posts: 4823
20 Feb 2015 09:30 PM
21:30:29.616 - Workspace.MainScript:20: bad argument #1 to 'new' (Vector3 expected, got userdata)
Report Abuse
LeitrisArcade is not online. LeitrisArcade
Joined: 15 May 2010
Total Posts: 2127
20 Feb 2015 09:31 PM
local teleport = game.Workspace.Obby1.PlayerTeleportPos
for i,v in pairs(game.Players:GetChildren()) do
v.Character.Torso.CFrame = CFrame.new(teleport.Position)
end

( ͡ಠ ͜ʖಠ)
Report Abuse
ShadowAley is not online. ShadowAley
Joined: 23 Jun 2010
Total Posts: 4823
20 Feb 2015 09:35 PM
thanks so much!

follow-up question

how would i disable the message without removing it? like get it off the screen while the game is in session?
Report Abuse
ShadowAley is not online. ShadowAley
Joined: 23 Jun 2010
Total Posts: 4823
20 Feb 2015 09:37 PM
nvm!
Report Abuse
LeitrisArcade is not online. LeitrisArcade
Joined: 15 May 2010
Total Posts: 2127
20 Feb 2015 09:38 PM
Glad I could help :P

( ͡ಠ ͜ʖಠ)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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