Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

In my game, players can use the camera to see through walls! Help?

Is there some setting I can use to avoid this, is this a normal thing? Is this due to roblox updates? I don't really know anything about it other than it happened suddenly and now I cant reverse it...

Any ideas?

2 answers

Yes, it's normal. Nothing you can do except maybe make it first person? Although that inst needed really.

You could, add another part to each wall, slightly smaller. So your camera hits the Major wall, and sees the inner wall.

function GetObjects(par,parameter,tab) -- My find function --
	if not tab then tab = {} end
	for _,v in pairs(par:GetChildren()) do
		if parameter then
			if v:IsA(parameter) or v.Name == parameter then
				table.insert(tab,v)
			end
		else
			table.insert(tab,v)
		end

		if v:GetChildren()[1] then
			GetObjects(v,parameter,tab)
		end
	end
	return tab
end

for _,p in pairs(GetObjects(Workspace, "BaseParts")) do
	if p.Anchored and not p.CanCollide and p.Size.magnitude > 4 then -- Not needed but logical.
		local InnerWall = p:Clone()
		InnerWall.Parent = p
		InnerWall.FormFactor = "Custom"
		InnerWall.Size = p.Size - Vector3.new(0.1,0.1,0.1)
		InnerWall.CFrame = p.CFrame
	end
end

Line 20 isn't really needed, but it'll cut down on unnecessary brick count.

This discussion is preserved as it was. New answers, comments, and votes are closed.