Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 10 years ago

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

Log in to vote
0
Answered by 10 years ago

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

Ad
Log in to vote
0
Answered by
hiccup111 231 Moderation Voter
10 years ago

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.

Answer this question