공부하는 Nar
article thumbnail
[디토랜드] Create&Destroy
LuaScript 2021. 12. 23. 13:43

ServerScript - CreateSyncObject --Workspace/Sample/Cube 경로에 있는 오브젝트를 Cube 변수에 할당해요. local Cube = Workspace.Sample.Cube --오브젝트를 생성할 위치를 변수에 할당해요. local CreatePos = Vector.new(300, 0, 300) wait(2) --2초를 기다린 뒤, --오브젝트를 위치에 생성해요. --생성한 오브젝트를 바로 변수에 할당할 수 있어요. local NewObject1 = Game:CreateSyncObject(Cube, CreatePos) --서버에서만 CreateSyncObject 사용 print("Create Object Name : " .. NewObject1:GetName() ....

Guide For Roblox Developer
LuaScript 2021. 12. 10. 16:47

Clone과 Destroy * 아래와 같이 작성 시 정상적으로 작동하지 않는다. (홈페이지 https://ditoland-utplus.gitbook.io/ditoland/guide-for-developers/guide-for-roblox-developer) --Sever Script-- local cube = Workspace.Cube local createPos = Vector.new(1, 3, 2) --Clone처럼 동작합니다. local temp = Game:CreateSyncObject(cube, createPos, "Cube", Workspace) wait(2) --Destroy처럼 동작합니다. Game:DeleteObject(temp) * 정상 작동 코드, 문제 함수 수정 local temp ..