MapleStory Worlds/MSW IDE

특정 플레이어만 기능 주기

마루설아 2023. 9. 12. 07:06
client only
void OnBeginPlay()
{   
	wait(3) 
    
	local playerID = _UserService.LocalPlayer.OwnerId
    
	if playerID == "PLAYERID" then
		--PLAYERID에 해당되는 플레이어에게만 기능 부여
	end
}

-- OnBeginPlay()는 게임 시작 시 1회 수행되는 함수이지만 가끔 버그로 실행되지 않아서
-- wait(3): 3초 동안 기다리는 함수 추가