Pseudo-Invisicam methods?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I want a camera that makes them see-through (e.g. transparent) when they’re between the character and the camera. Although, I’m not sure where to start…

  1. What is the issue? Include screenshots / videos if possible!

I’m not able to use the usual invisicam method.
Current:

What I want to happen:

  1. What solutions have you tried so far? Did you look for solutions on the Creator Hub?

I’ve tried to use Invisicam by enabling it in starterplayer, which did not work. I suspect that it’s because I’m using a custom camera script:

--// Services
local RunService = game:GetService("RunService")
local UserInputService = game:GetService("UserInputService")

--// Variables
local camera = workspace.CurrentCamera
local root = script.Parent:WaitForChild("HumanoidRootPart")
local cameraPart = Instance.new("Part")

--// Settings
local zoomDistance = 30
local zoomMin = 15
local zoomMax = 60
local zoomStep = 5

--// Setup
cameraPart.Anchored = true
cameraPart.CanTouch = false
cameraPart.CanCollide = false
cameraPart.Transparency = 1
cameraPart.Parent = workspace

camera.CameraType = Enum.CameraType.Scriptable

local baseOffset = Vector3.new(30, 22, 30)
local baseCFrame = CFrame.lookAt(root.Position + baseOffset, root.Position)
local baseDirection = (baseCFrame.Position - root.Position).Unit
local baseRotation = baseCFrame - baseCFrame.Position

--// Zoom
UserInputService.InputChanged:Connect(function(input, gp)
	if input.UserInputType == Enum.UserInputType.MouseWheel then
		zoomDistance = math.clamp(zoomDistance - input.Position.Z * zoomStep, zoomMin, zoomMax)
	end
end)

--// Camera Lerp
RunService.PostSimulation:Connect(function(dt)
	local targetPos = root.Position + baseDirection * zoomDistance
	cameraPart.Position = cameraPart.Position:Lerp(targetPos, dt * 4)
	cameraPart.CFrame = CFrame.new(cameraPart.Position) * baseRotation
	camera.CFrame = cameraPart.CFrame
end)

just use raycast to check parts between the camera and the character

2 Likes

Ah, right… I’ve just come back to roblox studio and completely forgot about raycasts! Thank you.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.