08-11-2011, 12:16 AM
I'm trying to make a player that touches this script's parent teleport to a new world, but all it does for me is teleport the player to a certain position. Here's the script:
enabled = true
function OnCollided(hit)
if hit.Parent.Type == "Character" and enabled then
enabled = false
hit.Parent = game:getWorld("outside").World
hit.Position = Vec2D(77.69,63.88)
hit.Parent:remove()
enabled = true
end
end
link(script.Parent.Collided, OnCollided)
[/lua]
enabled = true
function OnCollided(hit)
if hit.Parent.Type == "Character" and enabled then
enabled = false
hit.Parent = game:getWorld("outside").World
hit.Position = Vec2D(77.69,63.88)
hit.Parent:remove()
enabled = true
end
end
link(script.Parent.Collided, OnCollided)
[/lua]