You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
? -
What is the issue? Include screenshots / videos if possible!
the issue is the erorr that gave me because idk how to code as always -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
none
wait()
local camera = game.Workspace.CurrentCamera
local direction = (game:GetService("Players").LocalPlayer.character.Head.Position - camera.CFrame.Position).Unit * 350 -- Change 100 to distance
local Parts = {} -- To make visible again
local directio1n = game:GetService("Players").LocalPlayer.character.Head.CFrame.LookVector
game:GetService("RunService").RenderStepped:Connect(function()
local ray = Ray.new(
camera.CFrame.LookVector,
directio1n
)
local ignore = game.Players.LocalPlayer.Character -- What to ignore
local hit, position = workspace:Raycast(ray,directio1n)
position = hit.Instance
if hit.Instance == nil then
hit = nil
else
hit = position
print(hit.Name)
end
end)
idk why does it gave me error i just wanna print the parts that are im the camera lookvector or something like that