I have a GUI that moves a frame to allow the user to drop an amount of wood. It seems to work fine but I want the user to be able to do the same thing with stone, metal, and other items in the inventory. This is the function to open the drop wood menu:
tiles.Wood.SlideSpace.WoodDrop.MouseButton1Down:connect(function()
if script.Parent.Position.X.Scale ~= 1 then
script.Parent.DropText.Text = "Drop Wood"
script.Parent:TweenPosition(UDim2.new(1,6,0,50) , "In" , "Sine" , .5 , false)
else
print("Cannot Execute")
end
end)
I know that there is a better way to do this for other items like stone instead of retyping the entire function and just changing the word Wood to Stone. Would anyone be able to help with this?
Thank you, Boogieboon
