Teleportation: Difference between revisions

From Legacy Roblox Wiki
Jump to navigationJump to search
>Mindraker
m →‎How Does It Work?: Nice, OOS. Rm "this needs help" tag
>KnKGames.Com
No edit summary
Line 1: Line 1:
== What Is Teleportation? ==
Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details!
Teleportation, a script commonly requested, is a script that moves a player or model, as a whole, to another location, instantly. Teleportation is not high-level scripting -- just follow this simple tutorial to familiarize yourself.
I am permantly banned from roblox!


== How Does It Work? ==
Please Spread The Word!


So, how does teleporting work? Imagine you're in a big box. So big, you can fit 25 of your friends/family/cousins in there. But today you're going to be the only one in the box, leaving allot of space for you to walk around in. Now, lets say there are these 2 small bricks in there. Apon touching it, you're instantly moved to the other. Why? Because of CFrame. CFrame records where you're at in the box. The teleporters change your [[CFrame]], so that you can popup in aother area. So, why can it teleport all things? It has to have a weld. All of the parts need to be connected for you to be teleported. If not, you're not going to popup in one piece on the other side. Your [[character]] is all connected, so you teleport in one piece.


<b>Note:</b>If all [[RBX.Lua.Part|parts]] are not connected, use :MoveTo(#,#,#) to move them, otherwise use CFrame.


== How Do I Do It? ==
Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details!
Just define a new CFrame for the object. Let's say we want to move a player.  Since the Torso is connected to all of a player's parts, we will change its CFrame, as follows:
I am permantly banned from roblox!
    game.Workspace.username.Torso.CFrame = CFrame.new(Vector3.new(0, 0, 0))


Just substitute your name for 'username' and fill in the coordinates.
Please Spread The Word!


== Other Uses ==
Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details!
There are other uses for CFrames, too.  You could send someone to a random location, by using the 'math.random()' function, e.g.,:
I am permantly banned from roblox!
    game.Workspace.username.Torso.CFrame = CFrame.new(Vector3.new(math.random(-200, 200), 30, math.random(-200, 200))
You could even teleport someone relative to their current location, like 50 studs up, for example!
<pre>
torso = game.Workspace.username.Torso
torso.CFrame = torso.CFrame + Vector3.new(0,50,0) -- note that I used Vector3.
</pre>


Here is a script you can copy and paste, that will teleport everyone on the map:
Please Spread The Word!
<pre>
    p = game.Players:GetChildren()
    for i = 1, #p do
    p[i].Character.Torso.CFrame = CFrame.new(Vector3.new(0, 0, 0))
    wait(1) -- waits 1 second
    end
</pre>


== Adding Effects ==
Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details!
When you have mastered basic teleportation, you can start to experiment, and add special effects.  For example:
I am permantly banned from roblox!
<pre>
local me = game.Players.N2KC
local c = me.Character:GetChildren()
for i = 1, #c do
if c[i].className == "Part" then
c[i].Reflectance = .1
c[i].Transparency = .1
wait(.1)
c[i].Reflectance = .2
c[i].Transparency = .2
wait(.1)
c[i].Reflectance = .3
c[i].Transparency = .3
wait(.1)
c[i].Reflectance = .4
c[i].Transparency = .4
wait(.1)
c[i].Reflectance = .5
c[i].Transparency = .5
wait(.1)
c[i].Reflectance = .6
c[i].Transparency = .6
wait(.1)
c[i].Reflectance = .7
c[i].Transparency = .7
wait(.1)
c[i].Reflectance = .8
c[i].Transparency = .8
wait(.1)
c[i].Reflectance = .9
c[i].Transparency = .9
wait(.1)
c[i].Reflectance = 1
c[i].Transparency = 1
wait(.1)
end
end


me.Character.Torso.CFrame = CFrame.new(Vector3.new(20, 10, 20)
Please Spread The Word!


for i = 1, #c do
Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details!
if c[i].className == "Part" then
I am permantly banned from roblox!
c[i].Reflectance = .9
 
c[i].Transparency = .9
Please Spread The Word!
wait(.1)
Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details!
c[i].Reflectance = .8
I am permantly banned from roblox!
c[i].Transparency = .8
 
wait(.1)
Please Spread The Word!
c[i].Reflectance = .7
Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details!
c[i].Transparency = .7
I am permantly banned from roblox!
wait(.1)
 
c[i].Reflectance = .6
Please Spread The Word!
c[i].Transparency = .6
Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details!
wait(.1)
I am permantly banned from roblox!
c[i].Reflectance = .5
 
c[i].Transparency = .5
Please Spread The Word!
wait(.1)
Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details!
c[i].Reflectance = .4
I am permantly banned from roblox!
c[i].Transparency = .4
 
wait(.1)
Please Spread The Word!
c[i].Reflectance = .3
Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details!
c[i].Transparency = .3
I am permantly banned from roblox!
wait(.1)
 
c[i].Reflectance = .2
Please Spread The Word!Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details!
c[i].Transparency = .2
I am permantly banned from roblox!
wait(.1)
 
c[i].Reflectance = .1
Please Spread The Word!
c[i].Transparency = .1
wait(.1)
c[i].Reflectance = 0
c[i].Transparency = 0
wait(.1)
end
end
</pre>
Just change your the name in the first line to your name, and you will be teleported to the location noted in the middle of the script.

Revision as of 06:14, 2 July 2008

Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details! I am permantly banned from roblox!

Please Spread The Word!


Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details! I am permantly banned from roblox!

Please Spread The Word!

Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details! I am permantly banned from roblox!

Please Spread The Word!

Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details! I am permantly banned from roblox!

Please Spread The Word!

Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details! I am permantly banned from roblox!

Please Spread The Word! Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details! I am permantly banned from roblox!

Please Spread The Word! Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details! I am permantly banned from roblox!

Please Spread The Word! Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details! I am permantly banned from roblox!

Please Spread The Word! Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details! I am permantly banned from roblox!

Please Spread The Word! Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details! I am permantly banned from roblox!

Please Spread The Word!Attention Everyone: I did not phish Roni123’s acount! Someone hacked knkgames.com! Talk to Roni123 for more details! I am permantly banned from roblox!

Please Spread The Word!