概要
robloxでassistantやってみた。
練習問題やってみた。
練習問題
パーツをドラッグして移動せよ。
手順
- workspaceに、partを追加。
- partに、DragDetectorを追加。
- partに、scriptを追加。
- スクリプトを書く。
local dragDetector = script.Parent.DragDetector
local part = script.Parent
part.Anchored = true
local highlight = Instance.new("Highlight")
highlight.Enabled = false
highlight.Parent = script.Parent
dragDetector.DragStart:Connect(function()
highlight.Enabled = true
end)
dragDetector.DragContinue:Connect(function()
end)
dragDetector.DragEnd:Connect(function()
highlight.Enabled = false
end)
写真
以上。