I want it to print what the camera is looking at but it will only print a part of the character (note: I blacklisted the character) or "Ray Hit Nothing"
Here is the code:
camera = workspace.CurrentCamera
player = game.Players.LocalPlayer
character = player.Character
local function Shoot(start, direction)
local rayParams = RaycastParams.new()
rayParams.FilterType = Enum.RaycastFilterType.Blacklist
rayParams.FilterDescendantsInstances = {character}
local ray = workspace:Raycast(start, direction, rayParams)
if ray then
print(ray.Instance)
else
print("Ray Hit Nothing")
end
end
while true do
Shoot(camera.CFrame.Position, camera.CFrame.LookVector)
wait(1)
end
please help :( thanks

1 comment
Also I am looking at a object when I run this