basically what I am trying to do is check a piece of information on the server for the client but it just returns nothing
Here is the script:
Client:
local RS = game:GetService('ReplicatedStorage')
local SCS = game:GetService('ServerScriptService')
-- Folder --
local MainClientFolder = RS:WaitForChild('MainClient')
-- Event --
local AskInfo = MainClientFolder.Event:WaitForChild('AskInfo')
local SendInfo = MainClientFolder.Event:WaitForChild('SendInfo')
script.Parent.MouseButton1Click:Connect(function()
local InfoAsk = 'Auto'
print(AskInfo:FireServer('Auto','M4A1'))
end)
server:
-- Service --
local RS = game:GetService('ReplicatedStorage')
local SCS = game:GetService('ServerScriptService')
-- Folder --
local MainClientFolder = RS:WaitForChild('MainClient')
local MainServerFolder = SCS:WaitForChild('MainServer')
-- Event --
local AskInfo = MainClientFolder.Event:WaitForChild('AskInfo')
local SendInfo = MainClientFolder.Event:WaitForChild('SendInfo')
-- SEH beginning --
print('Done loading '.. script.Name)
local function AskInfoFunction(player,InfoAsked,Gun)
--print('Debug Point 1')
local GunFolder = MainServerFolder.Gun:WaitForChild(Gun)
local InfoDataBase = require(GunFolder.Configuration)
--print('Debug Point 2')
local Info = InfoDataBase[InfoAsked]
--print('Debug Point 3')
return(Info)
end
AskInfo.OnServerEvent:Connect(AskInfoFunction)
the console: