recently started writing scripts and I got this error the script itself is here
PlayerGui.ShopGui.Frame.ScrollingFrame_12.ScrollingFrame.Arranger:9: attempt to index nil with 'IsA'
and script
game.ReplicatedStorage.GameClient.Events.RemoteEvent.PlayerLoaded:FireServer() print("PlayerLoaded") local player = game.Players.LocalPlayer local number = 1 game.ReplicatedStorage.GameClient.Events.RemoteEvent.BeginArrangement.OnClientEvent:Connect(function() print("Got") repeat local image = game.ReplicatedStorage.ToolsImage:FindFirstChild(number) 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.Parent.SideMenu sidemenu.ImageOftool.Image = image.Image sidemenu.ImageOftool.ImageColor3 = Color3.fromRGB(255,255,255) sidemenu.BuyButton.TextButton.Text = "Equip" sidemenu.Cost.CostOfTool.Value = 0 sidemenu.Cost.CostDisplayer.Text = "Cost : 0" sidemenu.NameOftool.TextLabel.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 local sidemenu = script.Parent.Parent.Parent.SideMenu sidemenu.ImageOftool.Image = image.Image sidemenu.ImageOftool.ImageColor3 = Color3.fromRGB(255,255,255) sidemenu.BuyButton.TextButton.Text = "Equipped" sidemenu.Cost.CostOfTool.Value = clone.CostDisplay.Value sidemenu.Cost.CostDisplayer.Text = "Cost : "..sidemenu.Cost.CostOfTool.Value sidemenu.NameOftool.TextLabel.Text = clone.ToolName.Value game.ReplicatedStorage.GameClient.Events.RemoteEvent.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)
GUYS PLS HELP ME
When you get an error that says "attempt to index nil with ___" it means that whatever variable is on the left side of the operation is nil. So in this case, it is attempting to index image with IsA, but cannot do so because image is nil, and nil does not have the IsA operation.
So what you will want to do is trace back through your script to find out where you last set image, and figure out why whatever it is being set to is nil. In this case, when you set image to
game.ReplicatedStorage.ToolsImage:FindFirstChild(number)
I'm guessing you've made a typo in the path or number just doesn't exist at all.
To read errors in the future, just remember that the format of the error message is "script:line:error"
If this solves your answer then mark it as the accepted solution, if not, don't hesitate to ask me questions regarding this issue in the comments below my answer.