so i want use AddAccessory code this is the script:
local Backpack = game.ServerStorage.r6
local ProximityPrompt = script.Parent
local Player = game.Players
local Humanoid = Player:WaitForChild("Humanoid")
ProximityPrompt.Triggered:Connect(function()
Humanoid:AddAccessory(Backpack)
end)
so this is the accessory
i want player to use it using ProximityPrompt
local Backpack = game.ServerStorage.r6
local ProximityPrompt = script.Parent
ProximityPrompt.Triggered:Connect(function(player) -- player who triggered it
local clone = Backpack:Clone() -- clone it for multiple uses
local Humanoid = player.Character:WaitForChild("Humanoid") -- humanoid is in the player's character
Humanoid:AddAccessory(clone) -- finally add the accessory we cloned to the player's humanoid
end)