Roblox Game Creator

로블록스_심화_6주차 (Items 2/2)

타몽쓰 2023. 1. 12.

😊 toolbox에서 배치하고 싶은 item 3개를 골라 각각의 script를 이해하고 원하는 대로 변형하기!

 

😊 예시>

① 원하는 item을 toolbox에서 검색

② item을 클릭! script를 살펴보고 code를 고쳐보기

//이전 code
function onActivated()
	if not enabled  then
		return
	end

	enabled = false
	
	Tool.GripForward = Vector3.new(0.0384, -0.128, 0.991)
	Tool.GripPos = Vector3.new(-2.3, -0.8, 0.5)
	Tool.GripRight = Vector3.new(-0.958, -0.287, 0)
	Tool.GripUp = Vector3.new(-0.285, 0.949, 0.134)

	sayings[math.random(1,#sayings)]:Play()
	wait(2)

	Tool.GripForward = Vector3.new(-0, 0, 1)
	Tool.GripPos = Vector3.new(0, -0.3, 0.4)
	Tool.GripRight = Vector3.new(1, 0, 0)
	Tool.GripUp = Vector3.new(0, 1, 0)

	
	enabled = true

end

 

③ 총 3개의 item을 고르고, 원래 code와 바꾼 code를 각각 종이에 써보기

ex) Vector3.new의 인자를 다르게 바꿔 아이템 가동 범위를 조절했다.

 

댓글