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?

More than 1 year has passed since last update.

robloxでassistant その41

Posted at

概要

robloxでassistantやってみた。
練習問題やってみた。

練習問題

Debrisサービスを使え。

手順

  • workspaceに、partを追加。
  • partに、clickdetectorを追加。
  • partに、scriptを追加。
  • スクリプトを書く。
local part = script.Parent
local clickdetector = part:WaitForChild("ClickDetector")
local Debris = game:GetService("Debris")
clickdetector.MouseClick:Connect(function(player)
	local clonedBomb = part:clone()
	local x = math.random(-100, 10)
	local z = math.random(-100, 10)
	clonedBomb.Position = Vector3.new(x, 100, z)
	clonedBomb.Parent = game.Workspace
	Debris:AddItem(clonedBomb, 5)
end)



以上。

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?