How do i put a part always in front/around the player?

Basically im trying to do the pixelation effect with glass + distortion (really far away from world origin)
The games in first person so i just need to have the glass in front of the camera.
This is the script from the original thread on the pixelation effect. I have no idea what to do with it or where to put it.

local Camera = workspace.CurrentCamera
local part = workspace.Glass
part.CanCollide = false
part.Anchored = true
part.Parent = workspace
local function update()
	part.CFrame = Camera.CFrame*CFrame.new(0,0,-0.41)*CFrame.Angles(math.pi/-2,math.pi/1,math.pi/1)
end
Camera:GetPropertyChangedSignal"CFrame":Connect(update)
update()

The part IS disappearing, to where? No clue but its not going to my camera

Yo this isn’t specifically about where the glass went, but if you have any transparent parts, the glass would make them invisible

unless im accidentally ignoring something

Im aware, i just saw the effect and thought it looked interesting and got too caught up in trying to make it, lol.

image
(this is what its supposed to look like)

2 Likes

Is there a reason why you can’t use a WeldConstraint?

this might be stupid and could break things, but what if you weld the glass to the character, like not IN the character, but TO the character

How do i weld it to the camera? i dont think you can do that

You can’t, but you can weld it to the character, sorry about my og post, didn’t realize it was the CFrame of the camera!

1 Like

Play around with the CFrame values a bit to try to find what’s appropriate.

Something that could also help is parenting the part to the Camera. This is usually done in view models and this part serves the same purpose so that may help.