Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I change the local script that clones into my backpack with the ImageButtons?

Asked by
neoG457 315 Moderation Voter
9 years ago
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = script.Parent

local ImageButton = Instance.new("ImageButton")
ImageButton.Parent = screenGui
ImageButton.Position = UDim2.new(0, 850, 0, 500)
ImageButton.Size = UDim2.new(0, 200, 0, 150)
ImageButton.Image = "rbxgameasset://Images/Arrow-red"
ImageButton.BackgroundTransparency = 1

local screenGui = Instance.new("ScreenGui")
screenGui.Parent = script.Parent

local ImageButton2 = Instance.new("ImageButton")
ImageButton2.Parent = screenGui
ImageButton2.Position = UDim2.new(0, 850, 0, 500)
ImageButton2.Size = UDim2.new(0, 200, 0, 150)
ImageButton2.Image = "rbxgameasset://Images/Arrow-back-red"
ImageButton2.BackgroundTransparency = 1

storage = game.ReplicatedStorage
backpack = game.Players.LocalPlayer.Backpack

ImageButton.MouseButton1Down:connect(function()

storage["Mask" .. tostring(3)]:clone().Parent = backpack

end)

This local script is meant to allow me to switch between two LocalScripts in replicated storage and clone the one I choose and put the clone in ReplicatedStorage. It is not complete and I'm stuck on what to do from this point. Please Help.

Answer this question