배낭

Roblox에서 배낭은 게임 중에 도구와 아이템을 저장하는 시스템입니다. 플레이어는 인벤토리에서 직접 이러한 도구를 접근하고, 장착하고, 사용할 수 있습니다.

local Players = game:GetService("Players")
local ServerStorage = game:GetService("ServerStorage")

local function onPlayerAdded(player)
    player.CharacterAdded:Connect(function(character)
        local conditionMet = player:FindFirstChild("SomeCondition")

        if conditionMet then
            local tool = ServerStorage:FindFirstChild("Sword")
            
            if tool then
                local toolClone = tool:Clone()
                toolClone.Parent = player:WaitForChild("Backpack")
            end
        end
    end)
end

Players.PlayerAdded:Connect(onPlayerAdded)

이 튜토리얼이 도움이 되셨다면, 저의 작업을 지원하기 위해 커피 한 잔을 사주시면 감사하겠습니다.

지원해 주셔서 정말 감사합니다!

커피 한 잔 사주기