0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PointLightのShadowsを一括OFF/削除するコマンド(Roblox Studio)

0
Last updated at Posted at 2026-02-09

Robloxで編集していると、Lightが多いときに重くなってしまいますよね。

image.png

とくに、何百個もLightがある場合は、「どうすればいいんだ…?」となります。

image.png

今回は、エディターのコマンドで、「一括でShadowsをオフ」にする方法を書きます。
(View → Command Bar)

image.png

一括でShadowsをオフするコマンド

(コピペすれば)難しくないです。

local count = 0

for _, inst in ipairs(workspace:GetDescendants()) do
	if inst:IsA("PointLight") then
		if inst.Shadows then
			inst.Shadows = false
			count += 1
		end
	end
end

print("PointLight Shadows OFF:", count)

丁寧に、実行後に件数を出してくれます。

image.png

なお、「ライトを全部けすんじゃぁぁぁぁ!!!」という場合は、ライトそのものを削除するコマンドもあります。

一括でPointLightを削除するコマンド

ワールドを破壊したり、Undoがきかない場合もあります。
ワールドを複製するなどして、気をつけましょう。

local count = 0

for _, inst in ipairs(workspace:GetDescendants()) do
	if inst:IsA("PointLight") then
		inst:Destroy()
		count += 1
	end
end

print("PointLight removed:", count)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?