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 
tigerr666 is not online. tigerr666
Joined: 13 Aug 2009
Total Posts: 1665
22 Jun 2013 09:55 PM
I'm not a beginner scripter, I'm actually near an intermediate scripter, but I can't get teleportation down. I'm trying to make a brick that teleports one player at a time when touched. And no, Its not using teles, I'm making this brick myself to move players to a certain position.



At first, I thought that p[i].Character was a good way to tele someone, until I just remembered that it teleports everyone at once, so I can't use this for an onTouched script. Does anyone know a script that can teleport one person at a time when a part is touched? The only thing I need help with is the teleportation itself, not fucntions and all.


I tried using game.Workspace.Player.CFrame, but that obviously only teleports the desired player. Any help? =/
Report Abuse
Voidion is not online. Voidion
Joined: 01 Aug 2011
Total Posts: 2668
22 Jun 2013 10:00 PM
MODELNAME:MoveTo(Vector3.new(0, 0, 0))

Moves a model to a position (the model would be the player's character).
Report Abuse
tigerr666 is not online. tigerr666
Joined: 13 Aug 2009
Total Posts: 1665
22 Jun 2013 10:02 PM
Yeah, but I want a script that can teleport different users as they touch it, not just one user.
Report Abuse
tigerr666 is not online. tigerr666
Joined: 13 Aug 2009
Total Posts: 1665
22 Jun 2013 10:04 PM
Help.
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
22 Jun 2013 10:17 PM
On touch you would have to set up a function

So..

function touch(h) -- If you're intermediate you know how to connect it so yeah.
if h.Parent:findFirstChild("Humanoid") then -- I am just checking to make sure it is human
h.Parent.Torso.CFrame = CFrame.new(1,1,1) -- Don't use Vector3 here it would kill the human
end
end


Basically you can either do moveTo:() or use CFrame on the Torso.
Report Abuse
RoAnt is not online. RoAnt
Joined: 14 Jul 2008
Total Posts: 16794
22 Jun 2013 10:20 PM
Post your code.

", I thought that p[i].Character was a good way to tele someone"


If you're an intermediate, you should know all the loops, EVEN a numeric for loop.
Report Abuse
ToboboT is not online. ToboboT
Joined: 25 Jun 2011
Total Posts: 2385
22 Jun 2013 10:22 PM
Just use mine...
Report Abuse
tigerr666 is not online. tigerr666
Joined: 13 Aug 2009
Total Posts: 1665
23 Jun 2013 12:59 AM
@Ro, did you not here me say "I REMEMBERED that it teleports everybody at once." I didn't say I forgot.
Report Abuse
tigerr666 is not online. tigerr666
Joined: 13 Aug 2009
Total Posts: 1665
23 Jun 2013 11:09 AM
Ty for for the help tobo.
Report Abuse
pomopaul is not online. pomopaul
Joined: 27 Aug 2011
Total Posts: 174
23 Jun 2013 11:25 AM
after the teleportation happens, make it activate a seperate script (thats disabled by default) that looks like this:

while true do
YOUR SCRIPT LOCATION.Disabled = true
wait(5)
YOUR SCRIPT LOCATION.Disabled = false
end
Report Abuse
babyyip is not online. babyyip
Joined: 17 Mar 2012
Total Posts: 4927
23 Jun 2013 11:27 AM
player = game.Players.Player --you might want to change this...
target = Vector3.new(20, 10, 20) --...and this

function fadeTo(a, b, c)
for transparency = a, b, c do
--go from a to b, counting by c

for _, part in pairs(player.Character:GetChildren()) do
--for each of the objects in the character,

if part:IsA("BasePart") then
--check if it's a part, and if so

part.Transparency = transparency
--set its transparency
end
end
wait(0.1)
end
end

fadeTo(0, 1, 0.1) --fade out,
player.Character.Torso.CFrame = target --teleport the player
fadeTo(1, 0, -0.1) --fade back in

Might be wrong
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