So basically im trying to make it to where if you have a gun or a tool in your backpack it clones onto the Ui and stuff but im not sure how to do that here is a script i just made off of scratch (may not be right)
local player = game.Players.LocalPlayer
local RS = game:GetService("ReplicatedStorage")
local GunsFrame = RS:WaitForChild("GunsFrame")
local GunsFrameClone = GunsFrame:Clone()
local SafeFrame = script.Parent
if player.Backpack:FindFirstChildWhichIsA("Tool") then
GunsFrameClone.Parent = SafeFrame.BGInventoryFrame.InventoryFrame
GunsFrameClone.DisplayBTN.Text = player.Backpack:FindFirstChildWhichIsA("Tool")
else
if player.Backpack:FindFirstChildWhichIsA("Tool") == nil then
GunsFrameClone:Destroy()
end
end