помогите как так же сделать только не через парт а через TextButton local Tool = game:GetService("ServerStorage").MedKit
script.Parent.MouseButton1Click:Connect(function(player) if player.Backpack:FindFirstChild(Tool.MedKit) or player.Character:FindFirstChild(Tool.MedKit) then return else local ClonedTool = Tool:Clone() ClonedTool.Parent = player.Backpack end end Ошибка Players.HEDCHER_1.PlayerGui.Shop.Frame.Aptek.Script:4: attempt to index nil with 'Backpack'
local Tool = game:GetService("ServerStorage").MedKit
script.Parent.MouseButton1Click:Connect(function(player)
if player.Backpack:FindFirstChild(Tool.MedKit) or player.Character:FindFirstChild(Tool.MedKit) then
return
else
local ClonedTool = Tool:Clone()
ClonedTool.Parent = player.Backpack
end
end
Ошибка Players.HEDCHER_1.PlayerGui.Shop.Frame.Aptek.Script:4: attempt to index nil with 'Backpack'