Hello i have this teleport script
local PENETRATE = true -- set to 'nil' instead of 'true' if you don't want it to penetrate through walls, etc
local player_unit = managers.player
layer_unit()
local camera = player_unit:camera()
local mvec_to = Vector3()
local from_pos = camera
osition()
mvector3.set( mvec_to, camera:forward() )
mvector3.multiply( mvec_to, 2000 )
mvector3.add( mvec_to, from_pos )
local col_ray = World:raycast( "ray", from_pos, mvec_to, "slot_mask", managers.slot:get_mask( "bullet_impact_targets" ) )
if col_ray then
if PENETRATE then
local offset = Vector3()
mvector3.set(offset, camera:forward())
mvector3.multiply(offset, 100)
mvector3.add(col_ray.hit_position, offset)
end
managers.player:warp_to(col_ray.hit_position, player_unit:rotation())
end
if managers.hud then
managers.hud:show_hint( { text = "TELEPORT" } )
end
IS not really good because it work sometime...sometime yes..sometime no..i want know if there is other script of teleport very good also where you can change the meteers to teleport you.help