Help with properties

  1. What do you want to achieve? I want my images be blacked out and the name and image of tools should come

  2. What is the issue? it doesnt work

  3. What solutions have you tried so far? i tried using other methods but they came with error but doesnt have errors

--part 1/2

local player = game.Players.LocalPlayer

script.Parent.MouseButton1Click:Connect(function()

	local templateno = tonumber(script.Parent.Parent.Name)
	local templatename = script.Parent.Parent.ToolName.Value
	local previousno
	local previousname
	if templateno ~=1 then
		previousno = templateno -1
		previousname = script.Parent.Parent.Parent:FindFirstChild(previousno).ToolName.Value
	else
		previousname = script.Parent.Parent.ToolName.Value
	end
	
	if player.OwnedItems:FindFirstChild(previousname) then
		
		local sidemenu = script.Parent.Parent.Parent.Parent.Parent.SideMenu
		sidemenu.ImageOftool.Image = script.Parent.Parent.ToolImageDisp.ImageLabel.Image
		sidemenu.ImageOftool.ImageColor3 = Color3.fromRGB(255,255,255)
		sidemenu.NameOftool.TextLabel.Text = script.Parent.Parent.ToolName.Value
		sidemenu.Cost.CostOfTool.Value = script.Parent.Parent.CostDisplay.Value
		sidemenu.Cost.CostDisplayer.Text = "Cost : "..sidemenu.Cost.CostOfTool.Value
		if player.Equipped.Value == script.Parent.Parent.ToolName.Value then
			sidemenu.BuyButton.TextButton.Text = "Equipped"
		elseif player.OwnedItems:FindFirstChild(templatename) then
			sidemenu.BuyButton.TextButton.Text = "Equip"
		else
			sidemenu.BuyButton.TextButton.Text = "Buy"
		end
	else
		local sidemenu = script.Parent.Parent.Parent.Parent.Parent.SideMenu
		sidemenu.ImageOftool.Image = script.Parent.Parent.ToolImageDisp.ImageLabel.Image
		sidemenu.ImageOftool.ImageColor3 = Color3.fromRGB(0,0,0)
		sidemenu.NameOftool.TextLabel.Text = "???"
		sidemenu.Cost.CostOfTool.Value = 0
		sidemenu.Cost.CostDisplayer.Text = "Cost : ???"
		sidemenu.BuyButton.TextButton.Text = "Can't Buy Now"
		
	end
end)
--oart 2/2
game.ReplicatedStorage.Remotes.PlayerLoaded:FireServer()
print("PlayerLoaded")
local player = game.Players.LocalPlayer
local number = 1
local strings = tostring(number)
game.ReplicatedStorage.Remotes.BeginArrangement.OnClientEvent:Connect(function()
	print("Got")
	repeat
		local image = game:GetService("ReplicatedStorage").ToolsImage:WaitForChild(strings)

		if image:IsA("ImageLabel") then
			print(image.Name)
			local clone = game.ReplicatedStorage.Template:Clone()
			clone.ToolImageDisp.ImageLabel.Image = image.Image
			clone.Name = image.Name
			clone.CostDisplay.Value = image.Cost.Value
			clone.ToolName.Value = image.ToolName.Value
			clone.Parent = script.Parent
			clone.ToolImageDisp.ImageLabel.ImageColor3 = Color3.fromRGB(0,0,0) 

			if clone.Name == "1" then
				local sidemenu = script.Parent.Parent
				sidemenu.tool_img.Image = image.Image
				sidemenu.tool_img.ImageColor3 = Color3.fromRGB(255,255,255)
				sidemenu.status.Text = "Equip"
				sidemenu.price.cost.Value = 0
				sidemenu.price.Text = "Cost : 0"
				sidemenu.name.Text = clone.ToolName.Value

			end

			if player.OwnedItems:FindFirstChild(clone.ToolName.Value) then
				clone.ToolImageDisp.ImageLabel.ImageColor3 = Color3.fromRGB(255,255,255)
			end

			local equipped = player:WaitForChild("Equipped")
			if equipped.Value~= nil then
				if clone.ToolName.Value == equipped.Value then
					script.Parent.tool_img.Image = image.Image
					script.Parent.tool_img.ImageColor3 = Color3.fromRGB(255,255,255)
					script.Parent.ststus.TextButton.Text = "Equipped"
					script.Parent.price.Cost.Value = clone.CostDisplay.Value
					script.Parent.price.Text = "Cost : "..script.Parent.price.cost.Value
					script.Parent.name.Text = clone.ToolName.Value
					game.ReplicatedStorage.Remotes.EquipTool:FireServer(equipped.Value)
				end
			end

			local number = tonumber(clone.Name)
			if number ~= 1 then
				local previousnum = number-1
				local itemfound = script.Parent:FindFirstChild(previousnum)
				if itemfound then
					if player.OwnedItems:FindFirstChild(itemfound.ToolName.Value) then
						clone.ToolImageDisp.ImageLabel.ImageColor3 = Color3.fromRGB(255,255,255) 
					end 
				end
			end
		end
		number = number+1
	until number == game.ReplicatedStorage.TotalTools.Value + 1
end)

Could you please elaborate on this as I don’t understand what you want to achieve.

i


am trying to do this effect type of effect like the weapon u recently buy will have its model as well as the weapon after that but after that weapon it will show lock image

help (help is appriciated)
please

i think you could probably have a module script with a table containing each item of the shop and its properties such as price,image etc then when a player clicks the ui you can loop through the table thats in the modulescript and take the info and put in each textlabels

in the first or second part of the script?

probably the first should the module script should be in rep storage and you should get item info whever a player clicks so part 1 would be your choice

it is not working, i made a script inside the image button and made the script. But there is no errors and its not working.

local detail_of_dirt = require(rep:WaitForChild('details'))

script.Parent.MouseButton1Click:Connect(function()
	game.StarterGui.tools_gui.tools_frame.tool_img.Image = "rbxassetid://7035897038"
end)

help pls

help with my script pls thank you