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 その89

Last updated at Posted at 2024-05-29

概要

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

練習問題

AlignPositionを使え。

手順

  • ServerScriptServiceに、scriptを追加。
  • スクリプトを書く。

local part1 = Instance.new("Part", workspace)
part1.Position = Vector3.new(0, 0.5, -10)
part1.Size = Vector3.new(4, 1, 2)
part1.Anchored = true
part1.CanCollide = false
local part2 = Instance.new("Part", workspace)
part2.Position = Vector3.new(-10, 0.5, -10)
part2.Parent = workspace
part2.Anchored = false
local alignPosition = Instance.new("AlignPosition", part2)
alignPosition.Attachment0 = Instance.new("Attachment", part2)
alignPosition.Attachment1 = Instance.new("Attachment", part1)
while true do
	for i = 1, 50 do
		part1.Position += Vector3.new(0, 0, -0.5)
		wait()
	end
	for i = 1, 50 do
		part1.Position += Vector3.new(0, 0, 0.5)
		wait()
	end
end

写真

image.png

以上。

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?