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?

robloxでassistant その182

Posted at

概要

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

練習問題

SpecialMeshを使え。

写真

image.png

サンプルコード

ReplicatedFirst.LocalScript




local TweenService = game:GetService("TweenService")
local part = Instance.new("Part")
part.Size = Vector3.new(4, 8, 4)
part.Position = Vector3.new(0, 4, 0)
part.Anchored = true
part.CanCollide = false
local mesh = Instance.new("SpecialMesh")
mesh.MeshType = Enum.MeshType.FileMesh
mesh.MeshId = "rbxassetid://1086413449"
mesh.TextureId = "rbxassetid://1461576423"
mesh.Offset = Vector3.new(0, 0, 0)
mesh.Scale = Vector3.new(4, 4, 4)
mesh.VertexColor = Vector3.new(1, 1, 1)
mesh.Parent = part
part.Parent = workspace
local tweenInfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local blackTween = TweenService:Create(mesh, tweenInfo, { 
	VertexColor = Vector3.new(0, 0, 0) 
})
local redTween = TweenService:Create(mesh, tweenInfo, { 
	VertexColor = Vector3.new(1, 0, 0) 
})
local greenTween = TweenService:Create(mesh, tweenInfo, { 
	VertexColor = Vector3.new(0, 1, 0) 
})
local blueTween = TweenService:Create(mesh, tweenInfo, { 
	VertexColor = Vector3.new(0, 0, 1) 
})
local resetTween = TweenService:Create(mesh, tweenInfo, { 
	VertexColor = Vector3.new(1, 1, 1) 
})
while true do
	blackTween:Play()
	blackTween.Completed:Wait()
	redTween:Play()
	redTween.Completed:Wait()
	greenTween:Play()
	greenTween.Completed:Wait()
	blueTween:Play()
	blueTween.Completed:Wait()
	resetTween:Play()
	resetTween.Completed:Wait()
	task.wait()
end



以上。

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?