I am making a simulator shop, and I have two remotes for each thing to buy: like a tool(that gives strength) and storage.
However, when I press “Buy” and I want to buy something other than tool , it fires the tool remote anyway. Please help:
Local script:
buy.Activated:Connect(function()
--ignore anything else, just focus on the result
if selectedTemp ~= nil and storageSelectedTemp == nil then
local result = Shared.Remotes.BuyTool:InvokeServer(selectedTemp.Name)
elseif selectedTemp == nil and storageSelectedTemp ~= nil then
local result = Shared.Remotes.BuyStorage:InvokeServer(storageSelectedTemp.Name)
end
end)
I don’t think I need to give the server script, however I will let you know that it cannot run because it searches in the folder for the storageName, but it cannot find as it runs the wrong remote.