params.FilterDescendantsInstances = {self.ReticleLens}
params.FilterType = Enum.RaycastFilterType.Include
local rayOrigin = self.Camera.CFrame.Position - (self.Camera.CFrame.LookVector * 5)
local rayDirection = self.Camera.CFrame.LookVector * 500
local redDotRay = workspace:Raycast(rayOrigin, rayDirection, params)
if redDotRay and redDotRay.Instance == self.ReticleLens then
if self.Aiming and self.Reticle then
local relativePos = self.Camera.CFrame:PointToObjectSpace(redDotRay.Position)
local redDotGoal = self.Camera.CFrame * CFrame.new(relativePos.X, relativePos.Y, -1.5)
self.Reticle.CFrame = self.Reticle.CFrame:Lerp(redDotGoal, 0.2)
self.Reticle.Transparency = 0
else
if self.Reticle then self.Reticle.Transparency = 1 end
end
end
else
if self.Reticle then self.Reticle.Transparency = 1 end
end
#This has me going for hours now
1 messages · Page 1 of 1 (latest)
** You are now Level 1! **