Tool with custom movement gets culled/disappears when its center is not on-screen

  1. What do you want to achieve? Make a flashlight tool which looks nice in my hand (lags pleasantlywhen I suddenly move). Here is the script I used:
local p = script.Parent; -- Handle, which is a meshpart
local t = p.Parent; -- Tool
local char = game.Players.LocalPlayer.Character;
local rh = char:FindFirstChild("RightHand") or char:FindFirstChild("RightArm")
rh.DescendantAdded:Connect(function(d)
	if d.Name == "RightGrip" then
		d:Destroy()
	end
end)

local lcp = Vector3.new()
game:GetService("RunService").RenderStepped:Connect(function(dt)
	local cammov = workspace.CurrentCamera.CFrame.Position-lcp
	p.Position += cammov*0.9 -- Make movement lag less intense
	local targetcf = workspace.CurrentCamera.CFrame*CFrame.new(1,-1,-2)
	p.CFrame = p.CFrame:Lerp(targetcf, 1 - math.exp(-10 * dt))
	lcp = workspace.CurrentCamera.CFrame.Position
end)
  1. What is the issue? Whenever the flashlight mesh’s center is not onscreen, the entire mesh stops rendering

  2. What solutions have you tried so far? I’ve tried adding a highlight, putting it inside a regular part, etc. None of these have worked. I think the problem might be with the fact that it’s a tool, not the fact that I’m using meshparts

You can do super hacky trick:
Try changing pivot

It worked!! Thank you!
New code:

local nm = script.Parent; -- Nicemesh
local h = nm.Parent; -- Sussy Handle
local t = h.Parent; -- Tool
local char = game.Players.LocalPlayer.Character;
local rh = char:FindFirstChild("RightHand") or char:FindFirstChild("RightArm")
rh.DescendantAdded:Connect(function(d)
	if d.Name == "RightGrip" then
		d:Destroy()
	end
end)

local lcp = Vector3.new()
game:GetService("RunService").RenderStepped:Connect(function(dt)
	local cammov = workspace.CurrentCamera.CFrame.Position-lcp
	nm.Position += cammov*0.9 -- Make movement lag less intense
	local targetcf = workspace.CurrentCamera.CFrame*CFrame.new(1,-1,-2)
	nm.CFrame = nm.CFrame:Lerp(targetcf, 1 - math.exp(-10 * dt))
	h.CFrame = nm.CFrame*CFrame.new(0,0,-2)
	lcp = workspace.CurrentCamera.CFrame.Position
end)