Hello,
I have problems with Scripting tool image to image button . It give me an error that said
18:25:21.421 ServerScriptService.Script:12: attempt to index nil with 'TextureId' - Server - Script:12
But I don’t see any problem in my scripts. Here is the script:
ame.ReplicatedStorage.UpdateItem.OnServerEvent:Connect(function(player)
for i , item in pairs(player.Inventory:GetChildren())do
if not player.PlayerGui:WaitForChild("ScreenGui" , 1):WaitForChild("Frame" ,2).ScrollingFrame:FindFirstChild(item.Name) then
local image = game.ReplicatedStorage:FindFirstChild(item.Name)
local temp = game.ServerStorage.ImageButton:Clone()
temp.Count.Text = item.Value
temp.nama.Text = item.Name
temp.Parent = player:WaitForChild("PlayerGui" , 2):WaitForChild("ScreenGui" , 1).Frame.ScrollingFrame
temp.Name = item.Name
temp.Image = image.TextureId
item:GetPropertyChangedSignal("Value"):Connect(function()
temp.Count.Text = item.Value
end)
end
end
end)
The problem start at this line
temp.Image = image.TextureId
Any help is appriciated