Robloxで一定間隔で点滅するパーツを作成する
スクリプトでパーツの色を変更する
パーツを作成し、名前をBlinkPartに変更する
そのパーツの配下にスクリプトを作成、名前をBlinkingとする

Blinkingスクリプトを以下のように編集する
-- workspace内にあるBlinkPartを取得する local part = game.Workspace.BlinkPart -- 色を変更する part.BrickColor = BrickColor.new(0.9,0.8,0.1)
実行結果

色を点滅させる
スクリプトを以下のように編集し、一定間隔で点滅するようにする
-- workspace内にあるBlinkPartを取得する local part = game.Workspace.BlinkPart -- 1秒ごとに色を変更する while true do part.BrickColor = BrickColor.new(0.9,0.8,0.1) wait(1) part.BrickColor = BrickColor.new(0.2,0.6,0.2) wait(1) end
結果
