For those who don’t know what wall check is, it is the process in which typical aimbot scripts perform of checking if a specified player is a wall within you or not and are in open space. By doing this you can use aimbot to lock onto the player’s head If they are not behind a wall.
And no, I am not exploiting. I am making a VIP menu for an FPS I am developing at the moment.
Also, I have tried using raycasting and have very little experience with it. So with that being said, I need the specific commands for doing so.
I have also tried many times with raycasting to perform aimbot wallcheck and none were successful.
All feedback appreciated; thank you.
How are you making an FPS game without understanding how raycasting works?
If you are using free models, you can also just search in the Toolbox for an aimbot script, there are plenty and if none fit your needs you can just copy paste the raycasting segment of any.
1 Like
I use mouse.target
mainly for my Roblox guns.
You can run checks by casting a ray to all of the other players from the client and seeing if there’s anything in the way. If an instance is returned then there is, but if not then they are not behind a wall.
It’d look something like this:
local playerService = game:GetService("Players")
local player = game.Players.LocalPlayer
local running = true
local playerChar = player.Character or player.CharacterAdded:Wait()
local playerTorso = playerChar:FindFirstChild("HumanoidRootPart")
while running do
task.wait(0.5)
local playersInSight = {}
for i, v in pairs(playerService:GetPlayers()) do
if v ~= player then
local enemyChar = v.Character or v.CharacterAdded:Wait()
local enemyTorso = enemyChar:FindFirstChild("HumanoidRootPart")
local ray = workspace:Raycast(playerTorso.Position, enemyTorso.Position - playerTorso.Position)
if ray then
table.insert(playersInSight, v)
end
end
end
print(playersInSight)
end
woops, accidentally pressed enter too early.
Let me try this, I will be back in a moment.
Edit: I’ve seen your changes.