06-14-2011, 05:06 AM
It won't let me save them as a model so I will post the code.
Alright make a box and name it tele1 and put a script in it. Here's the code.
[lua]
_G.test = "yes"
function OnCollided(hit)
if hit.Parent.Type == "Character" then
if _G.test == "yes" then
hit.Position = game.World.tele2.Position
_G.test = "no"
sleep(4)
_G.test = "yes"
end
end
end
link(script.Parent.Collided, OnCollided)[/lua]
Now make another box called tele2 and put this in it.
[lua]function OnCollided(hit)
if hit.Parent.Type == "Character" then
if _G.test == "yes" then
hit.Position = game.World.tele1.Position
_G.test = "no"
sleep(4)
_G.test = "yes"
end
end
end
link(script.Parent.Collided, OnCollided)[/lua]
Also you might want to leave room for the player to teleport. If you stick the teleporter on the ground then it will make the player stuck in the ground.
Alright make a box and name it tele1 and put a script in it. Here's the code.
[lua]
_G.test = "yes"
function OnCollided(hit)
if hit.Parent.Type == "Character" then
if _G.test == "yes" then
hit.Position = game.World.tele2.Position
_G.test = "no"
sleep(4)
_G.test = "yes"
end
end
end
link(script.Parent.Collided, OnCollided)[/lua]
Now make another box called tele2 and put this in it.
[lua]function OnCollided(hit)
if hit.Parent.Type == "Character" then
if _G.test == "yes" then
hit.Position = game.World.tele1.Position
_G.test = "no"
sleep(4)
_G.test = "yes"
end
end
end
link(script.Parent.Collided, OnCollided)[/lua]
Also you might want to leave room for the player to teleport. If you stick the teleporter on the ground then it will make the player stuck in the ground.