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

Posted at

概要

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

練習問題

CylindricalConstraintを、使え。

手順

  • ServerScriptServiceに、scriptを追加。
  • スクリプトを書く。
local part1 = Instance.new("Part", workspace)
part1.Anchored = true
part1.Size = Vector3.new(1, 2, 2)
part1.CFrame = CFrame.new(-0.513, 8.763, 10) * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(-45))
part1.Name = "Anchor"
local part2 = Instance.new("Part", workspace)
part2.Anchored = false
part2.Shape = Enum.PartType.Cylinder
part2.Size = Vector3.new(1, 3, 3)
part2.CFrame = CFrame.new(-2.987, 11.237, 10.25) * CFrame.fromEulerAnglesXYZ(0, 0, math.rad(-45))
local cylindricalConstraint = Instance.new("CylindricalConstraint", part1)
local attachment0 = Instance.new("Attachment", part1)
local attachment1 = Instance.new("Attachment", part2)
attachment0.Position = Vector3.new(-0.5, 0, 0)
attachment0.Axis = Vector3.new(-1, 0, 0)
attachment1.Position = Vector3.new(0.5, 0, 0)
attachment1.Axis = Vector3.new(-1, 0, 0)
cylindricalConstraint.Attachment0 = attachment0
cylindricalConstraint.Attachment1 = attachment1
cylindricalConstraint.LimitsEnabled = true
cylindricalConstraint.Restitution = 1

写真

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?