Developer knowledge network · moderated exchange

UnreliableCode 커뮤니티

개발자 연구, 리버스 엔지니어링 및 코딩 커뮤니티

Knowledge index살다
4Categories
919Threads
2.8K게시물
Tutorial

Luau Raycast visualization & Wall-Check algorithms in 3D space

raycast_ryan
Ballistics Dev
MEMBER
대표: 72
가입 날짜: Sep 2019
게시물: 32
감사해요: 16
3주 전 · Jul 29, 2026 11:51 PM
#1

To check if an enemy is behind a wall before triggering aimbot in Roblox:

LUA
local function IsVisible(targetHeadPos)
    local camera = workspace.CurrentCamera
    local origin = camera.CFrame.Position
    local direction = (targetHeadPos - origin)
    
    local raycastParams = RaycastParams.new()
    raycastParams.FilterDescendantsInstances = { game.Players.LocalPlayer.Character, camera }
    raycastParams.FilterType = RaycastFilterType.Exclude
    raycastParams.IgnoreWater = true
    
    local result = workspace:Raycast(origin, direction, raycastParams)
    if not result then return true end -- No obstacle hit, target is visible!
    
    -- Check if hit object is part of the enemy player character
    return result.Instance:IsDescendantOf(targetHeadPos.Parent)
end
luau_hacker
Luau Expert
MEMBER
대표: 159
가입 날짜: Aug 2020
게시물: 17
감사해요: 26
3주 전 · Jul 30, 2026 2:18 AM
#2

RaycastParams.FilterType = RaycastFilterType.Exclude is the modern replacement for legacy RaycastFilterType.Blacklist. Fast and clean.

matrix_math_guy
Math Specialist
MEMBER
대표: 105
가입 날짜: Aug 2018
게시물: 52
감사해요: 41
3주 전 · Jul 30, 2026 12:21 PM
#3

Eliminates shooting at targets hidden behind thick concrete walls.