I am working on a weapon inventory gui, but the button doesnt seem to be cloning into the frame.
--Main
local player = game.Players.LocalPlayer
local gui = script.Parent
local rs = game.ReplicatedStorage
local folder = rs:WaitForChild("Buttons")
--Player Values
local gun1 = player:FindFirstChild("gun1")
local gun2 = player:FindFirstChild("gun2")
--Setting Buttons
if gun1 then
button = folder:FindFirstChild(gun1.Value)
if button then
button:Clone().Parent = gui
end
end

4 comments
sir you can not put numbers n a variable with letters
ok but even without doing that it still doesnt work
You know you’re trying to clone a value? Is gun1 an item or just a string value?
Gun 1 is a string