You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
I am trying to send a table from the client to the server for a ghost car i am making. The table has the personal best time and all the positions of the ghost car which will then put it into datastores after it gets sent to the server. -
What is the issue? Include screenshots / videos if possible!
My issue is whenever I do something like
local t = {}
t.BestTime = 20 --seconds
RemoteEvent:FireServer(t)
Then on the server I will Write
RemoteEvent.OnServerEvent:Connect(function(player, info)
print(info.BestTime)
end)
It will print nil on the server
3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I’ve looked all over the devhub and it seems the only way I can get the time to the server is using table.insert()
but then it won’t have its own index making it really difficult to grab the time
for simplicity reasons, I want to try to stay away from using two values on the :FireServer()
line such as RemoteEvent:FireServer(Time, t)
Just figured out that if we don’t use both custom Index AND table.insert()
then it works; but I have to use both otherwise my system will grow to be more complex