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: Telaportation Script

Previous Thread :: Next Thread 
xbladex7 is not online. xbladex7
Joined: 13 Mar 2009
Total Posts: 364
07 Oct 2012 09:37 PM
Hello every one my username is xbladex7 as you see and i need help i am in the making of a disasters game and i am stuck on the process of trying to teleport the lobby from the lobby obviously to the base plate if any one could help me with this script and give me the lay out it would be much appreciated

-yours truly Xbladex7
Report Abuse
xbladex7 is not online. xbladex7
Joined: 13 Mar 2009
Total Posts: 364
07 Oct 2012 09:38 PM
when i mean lobby i mean players :)
Report Abuse
jordan4762 is not online. jordan4762
Joined: 08 Sep 2008
Total Posts: 4116
07 Oct 2012 09:50 PM
game.Workspace.Player.Torso.CFrame = CFrame.new(Vector3.new(0, 50, 0))

So, in pseudo (false) code:

if the player is in lobby and wants to join game then
game.Workspace.Player.Torso.CFrame = CFrame.new(Vector3.new(0, 50, 0))
else
end

Of course you would need to find out WHICH players, and change "game.Workspace.Player.Torso.CFrame = CFrame.new(Vector3.new(0, 50, 0))" to the location of the baseplate, and stuff....
Report Abuse
xbladex7 is not online. xbladex7
Joined: 13 Mar 2009
Total Posts: 364
07 Oct 2012 09:52 PM
cool but how would you teleport them back lets say the waiting time is 20 seconds in the lobby like you said the script will telaport them to the base plate how would you telaport them back after the disaster is finished.
Report Abuse
jordan4762 is not online. jordan4762
Joined: 08 Sep 2008
Total Posts: 4116
07 Oct 2012 10:01 PM
First of all, next time go to scripting helpers, unless you have an advanced topic such as metatables

Say the lobby is located at (100,200,300)
And the base is located at (400,500,600)

---------------------------------------------------------------------

disasterTime = 20 --In seconds
function teleport()
for i, player in ipairs(game.Players:GetChildren()) do
player.Character.Torso.CFrame = CFrame.new(Vector3.new(400, 500, 600)) --Baseplate
wait(disasterTime)
player.Character.Torso.CFrame = CFrame.new(Vector3.new(100, 200, 300)) --Lobby
end
end


Then you just call teleport() and it will teleport you to base, wait for the disasterTime, and teleport you back to the lobby. If you want a loop, I could also fix it for that, just ask.
Report Abuse
xbladex7 is not online. xbladex7
Joined: 13 Mar 2009
Total Posts: 364
07 Oct 2012 10:03 PM
Could you please :) thank you so much your a life saver
Report Abuse
jordan4762 is not online. jordan4762
Joined: 08 Sep 2008
Total Posts: 4116
07 Oct 2012 10:13 PM
-------------------------Settings---------------------------------------------
disasterTime = 20 --Time disasters last, in seconds
inBetweenTime = 60 --Time in between disasters, in the Lobby, in seconds
lX = 0 --Lobby's X coordinate
lY = 0 --Lobby's Y coordinate
lZ = 0 --Lobby's Z coordinate
bX = 0 --Baseplate's X coordinate
bY = 0 --Baseplate's Y coordinate
bZ = 0 --Baseplate's Z coordinate
-------------------------Settings---------------------------------------------

function teleport()
for i, player in ipairs(game.Players:GetChildren()) do
wait(inBetweenTime)
player.Character.Torso.CFrame = CFrame.new(Vector3.new(bX, bY, bZ))
wait(disasterTime)
player.Character.Torso.CFrame = CFrame.new(Vector3.new(lX, lY, lZ))
end
end

while true do
teleport()
end
Report Abuse
Maelstronomer is not online. Maelstronomer
Joined: 07 Jun 2008
Total Posts: 7649
07 Oct 2012 10:44 PM
Instead of getting all those read-only individual coordinates, can't you just say

...Torso.CFrame = workspace.Part1.CFrame
Report Abuse
jordan4762 is not online. jordan4762
Joined: 08 Sep 2008
Total Posts: 4116
08 Oct 2012 11:42 AM
I beleive so, but I am not very experienced using CFrames, and I just basically took that snippet and typed it, straight of the wiki.
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