Image wont update through server script

try changing that line to
Gear.Image = 0

i tried, it does not seem to be working

I think it has something t do with using rgb and hsv to chang eht colors idk cuz ive never tried it before

The rgb background change is only for the equip / unequip effect. When its equipped its red and says unequip, and when its not equipped its green and says equip

The colors should both be from the RBG color:

  1. Change color type to Color3.FromRGB

Thats the thing, the colors are working fine ( i changed it to rgb, still the same thing) everything is working fine. The script it self runs, heck, i have a print script to print when it changes and it does print, its just it only shows when i click on a common item. Which is weird since the only diffrence between them is the name, and any diffrences shouldnt matter since they are using the same script in each and every one of them and they are updating the same value. The value changes then the item that changed the value now gets unequip and red text and heck it even equips the item. It just seems like every other item besides the common one (one in grey) skips over that line and ONLY that line of code, yet it still detects change and prints it

Maybe you have ImageTransparency on?
On is 1.
If it is in 1 change to 0.

yea its on 0, it works. Just only works for the common one

If there is spaces on the items names it’s won’t work. @Daark3nd

if this is hard to understand, its like i have 4 diffrent click detections. They each have a local script inside of them that says

Value.Changed:Connect:Function()
“print(“Hi”)
print(“Hello”)
print(“Bye”)”
end)

when clicked each of them change the value and the script detects that. The problem is, the first one when clicked prints hi hello and bye just fine. The rest of them only prints hi and bye, and skips over Hello like it couldnt read it.

ill share my script

Item Handler (Server)

game.Lighting.GUIRemotes.ItemGiver.OnServerEvent:Connect(function(player,Item,equipped)
	local character = player.Character
	
	local GearEquiped = player.Inventory.Gear.Equiped
	local gearequiped = game.ReplicatedStorage.InventoryGui.GearIsEquiped
		
		
	--------------------------------------------------------SludgeHead------------------------------------------------------------
		
	if Item == "CSludgeHead" then
		
		local itemid = player.Name .. Item		
		
		if GearEquiped.Value == false then	
			
			GearEquiped.Value = true
			gearequiped.Value = Item
			
			itemequiped[itemid] = true
			
		local SludgeHead = serverstorage:FindFirstChild("Gear").Gear.SludgeHead:Clone()
		SludgeHead.Anchored = false
		SludgeHead.Parent = character

		SludgeHead.CFrame = (CFrame.new(character.Head.Position,character.Head.Position + -character.Head.CFrame.LookVector))
		local weld = Instance.new("Motor6D")
		weld.Part0 = SludgeHead
		weld.Part1 = character.Head
		weld.C0 = weld.Part0.CFrame:toObjectSpace(weld.Part1.CFrame)		
		weld.Parent = SludgeHead
		weld.Name = "Head"	
			
		StatBoost(player,250)			
			
		else
			
			if itemequiped[itemid] == true then
			
			GearEquiped.Value = false
			gearequiped.Value = "None"

				if player.Character:FindFirstChild("SludgeHead") then	
					player.Character:FindFirstChild("SludgeHead"):Destroy()
				end	
				
			StatBoost(player,-250)	
				
				
				itemequiped[itemid] = false
				
			end		
		end
		
	elseif Item == "USludgeHead" then
		
		local itemid = player.Name .. Item
		
		if GearEquiped.Value == false then	
			
			itemequiped[itemid] = true
			
			GearEquiped.Value = true
			gearequiped.Value = Item
			
			local SludgeHead = serverstorage:FindFirstChild("Gear").Gear.SludgeHead:Clone()
			SludgeHead.Anchored = false
			SludgeHead.Parent = character

			SludgeHead.CFrame = (CFrame.new(character.Head.Position,character.Head.Position + -character.Head.CFrame.LookVector))
			local weld = Instance.new("Motor6D")
			weld.Part0 = SludgeHead
			weld.Part1 = character.Head
			weld.C0 = weld.Part0.CFrame:toObjectSpace(weld.Part1.CFrame)		
			weld.Parent = SludgeHead
			weld.Name = "Head"	

			StatBoost(player,332)			

		else
			
			if itemequiped[itemid] == true then
			
			GearEquiped.Value = false
			gearequiped.Value = "None"
				
			if player.Character:FindFirstChild("SludgeHead") then	
			player.Character:FindFirstChild("SludgeHead"):Destroy()
			end	
					
					StatBoost(player,-332)	
					
				
				itemequiped[itemid] = false

			end		
				
		end
		
	elseif Item == "RSludgeHead" then

		local itemid = player.Name .. Item

		if GearEquiped.Value == false then	

			itemequiped[itemid] = true

			GearEquiped.Value = true
			gearequiped.Value = Item

			local SludgeHead = serverstorage:FindFirstChild("Gear").Gear.SludgeHead:Clone()
			SludgeHead.Anchored = false
			SludgeHead.Parent = character

			SludgeHead.CFrame = (CFrame.new(character.Head.Position,character.Head.Position + -character.Head.CFrame.LookVector))
			local weld = Instance.new("Motor6D")
			weld.Part0 = SludgeHead
			weld.Part1 = character.Head
			weld.C0 = weld.Part0.CFrame:toObjectSpace(weld.Part1.CFrame)		
			weld.Parent = SludgeHead
			weld.Name = "Head"	

			StatBoost(player,415)			

		else

			if itemequiped[itemid] == true then

				GearEquiped.Value = false
				gearequiped.Value = "None"

				if player.Character:FindFirstChild("SludgeHead") then	
					player.Character:FindFirstChild("SludgeHead"):Destroy()
				end	
				StatBoost(player,-415)	

				itemequiped[itemid] = false

			end		

		end
		
	elseif Item == "PSludgeHead" then

		local itemid = player.Name .. Item

		if GearEquiped.Value == false then	

			itemequiped[itemid] = true

			GearEquiped.Value = true
			gearequiped.Value = Item

			local SludgeHead = serverstorage:FindFirstChild("Gear").Gear.SludgeHead:Clone()
			SludgeHead.Anchored = false
			SludgeHead.Parent = character

			SludgeHead.CFrame = (CFrame.new(character.Head.Position,character.Head.Position + -character.Head.CFrame.LookVector))
			local weld = Instance.new("Motor6D")
			weld.Part0 = SludgeHead
			weld.Part1 = character.Head
			weld.C0 = weld.Part0.CFrame:toObjectSpace(weld.Part1.CFrame)		
			weld.Parent = SludgeHead
			weld.Name = "Head"	

			StatBoost(player,500)			

		else

			if itemequiped[itemid] == true then

				GearEquiped.Value = false
				gearequiped.Value = "None"

				if player.Character:FindFirstChild("SludgeHead") then	
					player.Character:FindFirstChild("SludgeHead"):Destroy()
				end	
				StatBoost(player,-500)	

				itemequiped[itemid] = false

			end		

		end
		
	end	
end)

I am not sure what is the solution.

Item Handler (Local)

local player = game.Players.LocalPlayer
local equip = script.Parent
local item = script.Parent.Parent

local weapon = false

local animations = script:WaitForChild("Animations")

local katanaAnim = animations:WaitForChild("KatanaIdle")

local Humanoid = player.Character:WaitForChild("Humanoid")

local KatanaIdle = Humanoid:LoadAnimation(katanaAnim)

local Weapon = script.Parent.Parent.Parent.Parent.Parent.PlayerInfo.Weapon.WeaponImage

local Gear = script.Parent.Parent.Parent.Parent.Parent.PlayerInfo.Gear.GearImage

local gear = false

local Type = item.ItemImage.Updater.Type

local Gearequiped = game.ReplicatedStorage.InventoryGui.GearIsEquiped

local equipsound = script.Parent.Parent.Parent.Parent.Parent.Parent.Click

if Gearequiped.Value == item.Name then
	wait()
	
	local image = script.Parent.Parent.ItemImage.Updater.Image
	
	game.Lighting.GUIRemotes.ItemGiver:FireServer(item.Name,nil,image)
	
	if Gearequiped.Value == item.Name then
		equip.BackgroundColor3 = Color3.fromHSV(0, 1, 1)
		equip.Text = "Unequip"

		Gear.Image = script.Parent.Parent.ItemImage.Updater.Image

	else

		Gear.Image = ""

		equip.BackgroundColor3 = Color3.fromRGB(11, 255, 60)
		equip.Text = "Equip"

	end
	
end

Gearequiped.Changed:Connect(function()
	
	
--	if item.Name == "CSludgeHead" or item.Name == "USludgeHead" or item.Name == "RSludgeHead" or item.Name == "PSludgeHead" then
		
		Gear.Image = "rbxthumb://type=Asset&id=6435589354&w=420&h=420"
		
--	end
	
	if Gearequiped.Value == item.Name then
		equip.BackgroundColor3 = Color3.fromRGB(255, 0, 0)
		
		equip.Text = "Unequip"
		
	--	Gear.Image = script.Parent.Parent.ItemImage.Updater.Image.Value
		
	else
		
		Gear.Image = " "
		
		
		
		equip.BackgroundColor3 = Color3.fromRGB(0, 255, 0)
		equip.Text = "Equip"
		
	end
	
	equipsound:Play()
	
end)

equip.MouseButton1Click:Connect(function()
	if Type.Value == "Gear" then	

	if gear == false then

		gear = true
			
		local image = script.Parent.Parent.ItemImage.Updater.Image	
			
			game.Lighting.GUIRemotes.ItemGiver:FireServer(item.Name,nil,image)
			
	else
			
			local image = script.Parent.Parent.ItemImage.Updater.Image	
			
			game.Lighting.GUIRemotes.ItemGiver:FireServer(item.Name,true,image)

		gear = false

		end	
				
	end
end)

At the Gearequiped.Changed function is the problem, i dont know why it skips over the Gear.Image and makes the image blank

Why is there in the local handler at if … == … or but lile with the commentary?

oh that was previously what i was doing. I wanted it to only set the image if the item name == this, but then it wasnt working so i just thought to test to see that everytime it updates, the image would be this, but it doesnt work for items that arent CSludgeHead (CommonSludgeHead)

I do not see what could be the problem. Maybe asding a argument to the function?

hmm i think the problem is something like, the image’s image is not being set correctly or something along the lines, because this code has been working perfectly, and perfectly after i set the image, its only the image casuing the problem, every single other part of the script works, and even after. Usually if their was an error it would break the script but it doesnt even break, so that makes me think its the image and theirs something wrong with it

Since you already have GearEquiped, capitalized or not it’s think it’s the same.

I see what you mean, but i dont think so because that part of the code also works as intended before i add the image, the only thing that doesnt work is the image.