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

How would i go about skipping camera and terrain?

Asked by 5 years ago

trying to make a xray script and since transparency is not a member of camera or terrain im trying to look past them here is a part of the local script

  local mouse = game.Players.LocalPlayer:GetMouse()

    mouse.KeyDown:Connect(function(key)

    if key == key.lower("c") then

    print("c")

    for i,parts in pairs(game.Workspace:GetDescendants()) do

    if not parts.Name == "Camera" and not parts.Name == "Terrain" then
    local found = parts

print("skipped camera and terrain")

it only prints c

Answer this question