I’m trying to make a holographic sight in which the reticle stays in the center of the screen. Right now I’m using a billboard gui 80 studs in front of the camera which works fine, but the reticle doesn’t clip out when it is outside the frame of the scope. I was hoping to achieve that by having the reticle in a surface gui with clips descendants enabled on the lens of the scope and projecting the 3d position of the current billboard gui onto the surface gui but I don’t know how I could go about doing this.
Ok, I think an easier approach would to ask why don’t you just keep the scope steady in the screen? Assuming the scope is welded to something, you could update the weld each frame to keep the scope in the center of the screen.
Wait until the scoping in animation is finished, then do:
local DISTANCE = 4
local Stepped = game:GetService("RunService").RenderStepped:Connect(function()
local TargetCFrame = Camera.CFrame.lookVector * DISTANCE
local ScopeWeld = Scope.Weld
local ScopeWeld.C0 = ScopeWeld.C0:CFrameToObjectSpace(TargetCFrame)
When zoomed in you can have it be that 80 studs away. When you unzoom just re position the reticle so that it’s in the scope. So when the player stops holding the zoom button, wait x time and put the reticle in the gun as if it was actually there. The time to wait depends on how quickly you unzoom I guess.
Create a part that is the size of the scopePart and use mouse.Target, If the target of the mouse is the scopePart then, Make the gui visible hence make it transparent, Oh and don’t untick the scopePart’s canQuery so that the mouse.Target detects it