Shop GUI Doesn't Load Elements

So I am trying to write a shop script which automatically loads the selected items data into the Info bar on the right upon the player clicking on the item’s thumbnail in the shop. (GUI below for reference)

Here’s the local script for it (Inside the item’s thumbnail)

local replicatedStorage = game:GetService("ReplicatedStorage")
local selectedItem = script.Parent.Parent.Parent:WaitForChild("SelectedItem")
local selectedImage = script.Parent.Parent.Parent:WaitForChild("ItemDescription").SelectedImage
local selectedName = selectedImage.SelectedName

-- Load

local Player = game.Players.LocalPlayer
local Name = script.Parent.Name -- CAPITAL N FOR PRICE
local name = script.Parent.Name -- lowercase n for image

-- Info

local Info = script.Parent.Parent.Parent.Info

local InfoImage = Info.ItemImage
local InfoName = Info.ItemName
local InfoPrice = Info.ItemPrice
local ValuePrice = Info.Price

script.Parent.MouseButton1Click:Connect(function()
	
	print ("sent")
	script.Parent.Parent.Parent.Parent.Click.Playing = true
	
	
	replicatedStorage.Shop.GetImage:InvokeServer(Player,name)
	replicatedStorage.Shop.GetPrice:InvokeServer(Player,Name)
	
	-- Price
	
	local ReturnPrice = replicatedStorage.Shop.GetPrice:InvokeServer(Name)
	
	InfoPrice.Text = ReturnPrice
	ValuePrice.Value = ReturnPrice
	
	-- Image
	
	local ReturnImage = replicatedStorage.Shop.GetImage:InvokeServer(name)
	
	InfoImage.Image = ReturnImage
	
	-- Name
	
	InfoName = script.Parent.Name
	
end)

And the ServerScript

local replicatedStorage = game:GetService("ReplicatedStorage")
local shopItems = game:GetService("ReplicatedStorage"):WaitForChild("ForSale") -- Where tools are held
local shop = replicatedStorage:WaitForChild("Shop")

replicatedStorage.Shop.GetImage.OnServerInvoke = function(Player,name)
	print ("Received")
	return shopItems[name].Image.Value
end

replicatedStorage.Shop.GetPrice.OnServerInvoke = function(Player,Name)
	return shopItems[Name].Price.Value
end

And Here’s the explorer:

Explorer

When I test the gui and click the “Test” button, nothing happens, and I get no errors either, the print function doesn’t work and neither does the click sound play. Why am I not getting any errors and how can I fix this?

Here’s a video incase you don’t understand:

Why do you need 2 different “Name” variables?

You can just create one and send it to both of the remote functions. Also, I noticed that you invoke the server when you don’t need to:

remote functions don’t need a Player argument because the player who sent the request is automatically passed as the first argument

Just do

script.Parent.Parent.Parent.Parent.Click:Play() -- although, make a variable for it, as this looks messy

Also,

replicatedStorage.Shop.GetImage:InvokeServer(Player,name)
replicatedStorage.Shop.GetPrice:InvokeServer(Player,Name)

^ this may be the issue as the client is waiting for a response from the server before proceeding

This is what the server sees

replicatedStorage.Shop.GetImage.OnServerInvoke = function(player, player, name)
	print ("Received")
	return shopItems[name].Image.Value
end

replicatedStorage.Shop.GetPrice.OnServerInvoke = function(player, player, Name)
	return shopItems[Name].Price.Value
end
Literal view
replicatedStorage.Shop.GetImage.OnServerInvoke = function(player, name, arg)
	print ("Received")
	return shopItems[name].Image.Value
end

replicatedStorage.Shop.GetPrice.OnServerInvoke = function(player, Name, arg)
	return shopItems[Name].Price.Value
end

-- "arg" is the argument you sent to the server for it to use, the "Name" variables is just the name for the "Player" instance which you weren't suppose to send

I recommend just doing

script.Parent.MouseButton1Click:Connect(function()
	print ("sent")
	script.Parent.Parent.Parent.Parent.Click:Play()
	
	-- Price
	local ReturnPrice = replicatedStorage.Shop.GetPrice:InvokeServer(Name)
	
	InfoPrice.Text = ReturnPrice or "undefined" -- "undefined" can be changed
	ValuePrice.Value = ReturnPrice or 0 -- you also can change "0" to any price
	
	-- Image
	local ReturnImage = replicatedStorage.Shop.GetImage:InvokeServer(name)
	InfoImage.Image = ReturnImage or "rbxassetid://00000" -- this can be changed to something as well
    -- like a "sorry, this hasn't loaded yet" image
	
	-- Name
	InfoName = script.Parent.Name

    -- the use of "or" is in case a certain value can be returned as "nil" and instead of breaking
    -- the thread, just set it to another value (of course, you don't need to do this and can remove them)
end)

I am confused, if we bring the RemoteFunction count down to one, should the script look like this?

(It doesn’t work by the way)

local replicatedStorage = game:GetService("ReplicatedStorage")
local shopItems = game:GetService("ReplicatedStorage"):WaitForChild("ForSale") -- Where tools are held
local shop = replicatedStorage:WaitForChild("Shop")

replicatedStorage.Shop.GetImage.OnServerInvoke = function(Name)
	print ("Received")
	return shopItems[Name].Image.Value and shopItems[Name].Price.Value
end

No, the player who sent the request is always the first argument passed (roblox does this)

replicatedStorage.Shop.GetImage.OnServerInvoke = function(player, Name)
	print ("Received")
	return shopItems[Name].Image.Value and shopItems[Name].Price.Value 
    -- if you're gonna to return multiple values, you would need to store them in seperate variables
end

this would look like

local image, price = replicatedStorage.Shop.GetImage:InvokeServer(name)
-- "image" would be the first value returned by the server
-- "price" is the second value returned