change the server script for a local script and try again
Oh, yes it worked, but how to fix the position? It is not right
To fix it, there is more than 1 solution. One solution would be to set the position of āAllMenuā to the same position as āSlot1ā or the same position of āSlot1ā as the position of āAllMenuā
āAllMenuā is the tab where all sword should be and āSlot1ā is the first slot in the inventory frame, I can not put the same position for them
The second solution i think of is:
put Sword1 on "Slot1, set the correcte position then edit the script:
local button = script.Parent
local player = game.Players.LocalPlayer
button.MouseButton1Click:Connect(function()
local sword1 = button.Parent:Clone()
sword1.Parent = player.PlayerGui:WaitForChild(āBackpackā):WaitForChild(āBackpackā).Inventory.Slot1
sword1.Position = PositionYouJustGetFromSetting
end)
Once you did set the position, undo the actions with CTRL+Z
In the script there is an orange underline, it says W015: Assigning 2 values to 1 variables leaves some values unused
Where you wrote āPostionYouJustGetFromSettingā I edited it with {-0.001, 0},{-0.005, 0}, whatās wrong?
i did a mistake about saying it, instead of it, use UDim2.fromOffset(-0.001, -0.005)
Ok now there is another error in the outout:
Inventory is not a valid member of Frame āPlayers.LuigiMinecraft03.PlayerGui.Backpack.Backpackā
Phew, now try this code to see if it works
I had to go but now I am back, the script works because I see in the explorer while I am testing that there is the Image Label cloned but I can not see it
Does it finally work or does the code require something else?