如何对框架进行编程?

发布于 2024-10-04 23:40:00 字数 36 浏览 0 评论 0原文

就像我点击冰箱门,它就会打开,或者点击箱子,顶部就会滑落。

Like if i click on a fridge door and it opens, or click on a chest and the top slides off.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

又爬满兰若 2024-10-11 23:40:00

在其中添加一个 ClickDetector,并添加一个执行您想要执行的操作的脚本。要从侧面打开它,您可以这样做:(它可能不会以正确的方式转动)

for i = 1, 90 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, math.pi*90/1, 0)
wait()
end

Add a ClickDetector inside of it, and add a script that does what you want to do. To open it sideways you can do this:(It might not turn the right way)

for i = 1, 90 do
script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, math.pi*90/1, 0)
wait()
end
心的位置 2024-10-11 23:40:00

添加一个点击检测器,并为其编写脚本,以便单击时父部件从一个位置移动到另一个位置。

Add a clickdetector, and script it so onclick the parent part moves from one place to another.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文