Hello guys, I’m currently making a realistic fps game and now I got a problem with RayCasting
‘’’
local Params = RaycastParams.new()
Params.FilterType = Enum.RaycastFilterType.Exclude
Params.FilterDescendantsInstances = Filter
local RayCastResult = workspace:Raycast(DrawBackStart.Position, Direction, Params)
if RayCastResult then
print(RayCastResult.Distance)
DrawBackOffset = CFrame.new(0,0,RayCastResult.Distance)
else
DrawBackOffset = CFrame.new()
end
‘’’
this code works completely fine but the output is 9 to 0 but in order to make the weapon draw back system I need the output to be 0 to 9, I already try to reverse it but it didn’t work quite well here’s the problem in game