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: Teleporting Players

Previous Thread :: Next Thread 
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Nov 2012 11:52 AM
Hey, I want to teleport players to one of 4 positions randomly. Most help Didn't work, One guy said to check out a roblox LUA website, i found teleporting players, it didnt work... can anyone help? thanks!
Report Abuse
buddy249950 is not online. buddy249950
Joined: 30 Jun 2016
Total Posts: 3536
10 Nov 2012 11:54 AM
Make a table that has the 4 positions in it and then make it teleport the players to it using a for loop to get all the players. Use math.random to make it randomly teleport them to the positions.
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Nov 2012 11:58 AM
Okay, But how do i get the players to get teleported??
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
10 Nov 2012 11:58 AM
Please, don't say LUA. It bugs me so much.

position1 = (5,5,5)
position2 = (45,22,33)
position3 = (34,64,2)
position4 - (3,5,22)

function playermove(playername)
local num = math.random(1,4)
if num == 1 then
playername:MoveTo(position1)
elseif num == 2 then
playername:MoveTo(position2)
elseif num == 3 then
playername:MoveTo(position3)
else
playername:MoveTo(position4)
end end

--If you want the function to execute, say

playermove("NAMEOFPERSONHERE")

--ex. playermove("TheAwesomenessDude")
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
10 Nov 2012 12:00 PM
position1/2/3/4 are the 4 positions that you want. I haven't tested it yet, so if it doesn't work tell me :)
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Nov 2012 12:07 PM
Okay thanks :) also i cant put in playernames.. i need it to teleport any player in the game
Report Abuse
Taniss99 is not online. Taniss99
Joined: 15 Dec 2007
Total Posts: 1707
10 Nov 2012 12:14 PM
Then turn it to an onTouch:connect function. And just get the touched part
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Nov 2012 12:16 PM
I cant really make it an ontouched part.. how do i get them to get to the postition?
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
10 Nov 2012 12:18 PM
Ok so you want it to work for any player, but how and when? Are you making a teleport button so when they click it the teleport? Or when they touch a brick they teleport? If you tell me specifically then I can edit it for you.
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Nov 2012 12:22 PM
It's something like Workspace.Player.LocalPlayer idk :P i thought that would find any player in the game?
Report Abuse
TheAwesomenessDude is not online. TheAwesomenessDude
Joined: 17 Jul 2011
Total Posts: 11602
10 Nov 2012 12:26 PM
Well what do you want to trigger the teleportation?
It won't happen by itself.

I'm asking if you want:

A teleport brick where you touch it and you teleport?
A teleport gui?
A teleport brick where you click it and you teleport?

There are so many more options, that is all I'm asking.
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Nov 2012 12:34 PM
Well, I have a script that first prints a message on the screen, then when its done, (I put the messages and wait functions and everything) I want the player to automatically teleport to one of the positions i need them to go to. So really nothing being clicked or touched, just going to the position.

Btw sorry for not saying this before :P
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Nov 2012 12:43 PM
anyone? :L
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Nov 2012 12:48 PM
moo..
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
10 Nov 2012 12:51 PM
Do you want every player to teleport to a random position? If so, try this:

positions = {"5,5,5","45,22,33","34,64,2","3,5,22"}

function playermove(playername)
playername.Character:MoveTo(Vector3.new(positions[math.random(1,#postions)]))
end end

for _,v in pairs(game.Players:GetPlayers()) do
playermove(v.Name)
end

~ thedeathmaster01 ~
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Nov 2012 01:19 PM
this still wont work ;(
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Nov 2012 01:54 PM
anyone??
Report Abuse
BELLYBUTTONMAN5 is not online. BELLYBUTTONMAN5
Joined: 03 Jul 2010
Total Posts: 160
10 Nov 2012 06:22 PM
........
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