In Poppercam_Classic script on line 79 there is an ignore list. I have forked this straight out of my game and had found this on the forums at the time to prevent players heads from glitching out this same way. There is probably some way for you to add your bricks into this ignore list?
local ignoreList = {}
for _, characterplayer in next, game.Players:GetPlayers() do
if characterplayer.Character and characterplayer.Character.Parent then
ignoreList[#ignoreList + 1] = characterplayer.Character
end
end
After looking through Robloxâs poppercam scripts (the part of the camera script thatâs in control of what youâre trying to avoid), I noticed thereâs no external way of adding parts to an ignore list. So hereâs my suggestion:
Iâve modified the popper script in the camera script to accept anything with a âIgnoreCameraâ tag from CollectionService to be included in the blacklist. You can find it under game.StarterPlayer.StarterPlayerScripts.PlayerModule.CameraModule.ZoomController.Popper
Either copy the whole module and put it under starter character, or just replace the popper module since thatâs the only module I changed.
Yes, any instance that had a tag that gets destroyed loses its tags. You donât have to worry about collecting garbage with that since itâs done for you.
I never wrote the part that connected the ignorelist to the event when the collection tag gets removed. It should be right under the connection line where CollectionService:GetInstanceAddedSignal() is being called at.
hey this is 100% broken im trying to make the camera clip with fakeparts that are acting as the worldmodel parts but this script makes it 100% worse!
i cant move my camera around and it still collides and moves the camera:
I found this module and wasnât satisfied with its results, so I improved upon it. here you go if anyone wants it.
Same code concept just a tad bit more in-depth.
*you will still need to update the entire script below is just the portion of the code I modified
Updated code segment
-- 01/03/2025
--SillyMeTimbers: Remade the code below to match more what I was expecting when I looked for this.
--[[
* Updated the code to be more in-line with recent Luau updates
* Made it so if the blocks already had the tag they'll still get added to the ignoreList (eventually makes it way to the blacklist table)
* Added DescendantFiltering basically so if you have a model you only need to add it to the top instance and everything inside will also be excluded
* Verified that it does work with StreamingEnabled although I believe the original did as well.
]]
local blacklist = {}
local CollectionService = game:GetService("CollectionService")
local ignoreCameraInstances = {}
local rbxConnection = {}
function addIgnore(Object: BasePart)
ignoreCameraInstances[Object] = true
table.insert(blacklist, Object)
end
function removeIgnore(Object: BasePart)
ignoreCameraInstances[Object] = nil
table.remove(blacklist, table.find(blacklist, Object))
if not rbxConnection[Object] then return end
for _, Connection in rbxConnection[Object] do
Connection:Disconnect()
end
rbxConnection[Object] = nil
end
function filterObject(TaggedObject: BasePart, AddObject: BasePart?)
local sortObject = true and AddObject or TaggedObject --// If AddObject exist then it'll use that for filtering else it'll use TaggedObject
if sortObject:IsA("BasePart") then
addIgnore(sortObject)
elseif sortObject:IsA("Model") or sortObject:IsA("Folder") or sortObject:IsA("Actor") then
for _, SubObject in sortObject:GetDescendants() do
if not SubObject:IsA("BasePart") then continue end
addIgnore(SubObject)
end
end
if not TaggedObject:HasTag("IgnoreCamera") then return end
if rbxConnection[TaggedObject] then return end
rbxConnection[TaggedObject] = {}
rbxConnection[TaggedObject]["ObjectAdded"] = TaggedObject.DescendantAdded:Connect(function(AddObject)
filterObject(TaggedObject, AddObject)
end)
rbxConnection[TaggedObject]["ObjectRemoved"] = TaggedObject.DescendantRemoving:Connect(function(RemoveObject)
removeFilter(RemoveObject)
end)
end
function removeFilter(TaggedObject: BasePart)
if TaggedObject:IsA("BasePart") then
removeIgnore(TaggedObject)
elseif TaggedObject:IsA("Model") or TaggedObject:IsA("Folder") or TaggedObject:IsA("Actor") then
for _, SubObject in TaggedObject:GetDescendants() do
if not SubObject:IsA("BasePart") then continue end
removeIgnore(SubObject)
end
end
if not rbxConnection[TaggedObject] then return end
removeIgnore(TaggedObject)
end
for _, Object in CollectionService:GetTagged("IgnoreCamera") do
filterObject(Object)
end
CollectionService:GetInstanceAddedSignal("IgnoreCamera"):Connect(filterObject)
CollectionService:GetInstanceRemovedSignal("IgnoreCamera"):Connect(removeFilter)
Original code segment
local blacklist = {}
--BrokenBone: use game:GetService("CollectionService"):AddTag(YOUR_PART,"IgnoreCamera") to make a part not obscure a Camera
--dont know if this works perfectly, but its working for me. use at your own risk
local ignoreCameraInstances = {}
game:GetService("CollectionService"):GetInstanceAddedSignal("IgnoreCamera"):connect(function(Obj)
ignoreCameraInstances[Obj]=true
table.insert(blacklist, Obj)
end)
game:GetService("CollectionService"):GetInstanceRemovedSignal("IgnoreCamera"):connect(function(Obj)
ignoreCameraInstances[Obj]=nil
local r=0
for i=1, #blacklist do
if blacklist[i-r] == Obj then
table.remove(blacklist, i-r)
r=r+1
end
end
end)