What do you want to achieve? I want to get the CFrame from the RaycastResult of workspace:Raycast()
What is the issue? Mouse.Hit can be used to get the CFrame from the Mouse’ Ray, but i want to use the CFrame from workspace:Raycast()
the raycast script i made:
local Camera = workspace.CurrentCamera
local RayLength = 9223372036854775807
local RayResult
local ignoreList = {}
-- Raycast Params
local RayParams = RaycastParams.new()
RayParams.FilterType = Enum.RaycastFilterType.Blacklist
game:GetService("RunService").RenderStepped:Connect(function()
local CameraCFrame = Camera.CFrame
local CastedRay= workspace:Raycast(CameraCFrame.Position, CameraCFrame.LookVector * RayLength, RayParams)
RayResult = CastedRay.Position
end)