ViewportFrames Night vision and Thermal vision

Hey, I am working on a simple project that requires night vision and thermal vision.
I came up with 2 solutions already its just that I don’t really know how to implement one of them. So I found the first one where someone said put a Surface GUI on every players character body parts and make it white

Here’s what it looked like:

It was not really helpful as I was able to see the player through literally every object in the game. The Second option was to use ViewportFrames. I have only seen like 2 examples of viewports being used and I checked the wiki I understand most of the concepts. I just want to know how I can highlight just the players and nothing else through the viewport.

Thanks

3 Likes

Maybe try to do a for i,v loop. I’m not that experienced with things like this, but I could take a guess.

for i,v in pairs(game.Workspace:GetChildren()) do
	if v.ClassName == "Model" then
		if not v:FindFirstChild('Torso') then
		      print('not a player') 	
		else
			v.Torso.BrickColor = BrickColor.new() -- Color You Want	
		end
	end
end

I’m not sure this will make you able to see through walls. Please correct me if I’m wrong.

2 Likes

I’ll try it out

But i needed help with viewports not just the highlighting part

Try using :IsA() rather than .ClassName cause it’s a more efficient way to find a class.

1 Like

Have you tried turning off “AlwaysOnTop” for the GUI’s in their limbs??

Not sure if that exists for SurfaceGUI’s, but yeah this just came into my head.

1 Like

SurfaceGUIs have it, indeed. It’s a really cheap way but it’s very good if you can get everything.

Right, so viewports are helpful, but they’re not the thing for me. It was already a pain for me and still haven’t got it. Although surfaceguis are good and stuff, they won’t adapt to the goddamn mesh surfaces. So viewports are the most classy and fancy way (capped by our friend resolution) or the clunky very good way surfaceguis. There are other methods I cannot recall, though


I got viewportframes working a while back

5 Likes