Hello! I am having a Weird problem and I need some help. For Some odd reason my Table is losing Its Indexing and a Value. Here is the Related Code:
Server Script
local Car = require(game.ServerScriptService.CarScript)--This Is a module
local Folder = game.ServerStorage.Vehicles
for i,v in pairs(Folder:GetChildren())do
local name = Car.new(v,v.Configuration.Model.Value)
end
game.ReplicatedStorage.Events.GetCars.OnServerEvent:Connect(function(player)
print("CarGetting")
local Tabler = Car.GetTable()
print(Tabler)
game.ReplicatedStorage.Events.GetCars:FireClient(player, Tabler)
end)
A Local script In a UI:
local TS = game:GetService("TweenService")
local BlurGoal = {
Size = 16
}
local SavedTable= {}
game.ReplicatedStorage.Events.GetCars:FireServer()
local BlurInfo = TweenInfo.new(1)
local BlurTween = TS:Create(game.Lighting.Blur, BlurInfo, BlurGoal)
script.Parent.Changed:Connect(function()
if script.Parent.Visible == true then
script.Parent:TweenPosition(UDim2.fromScale(0.2,0.1), "InOut",Enum.EasingStyle.Linear, 1)
BlurTween:Play()
end
end)
game.ReplicatedStorage.Events.GetCars.OnClientEvent:Connect(function(saveTable)
print(saveTable)
for i,v in pairs(saveTable)do
table.insert(SavedTable,#SavedTable,v)
local frame = script.Parent.ScrollingFrame.Template:Clone()
local carName = frame:WaitForChild("CarName")
carName.Text = v.Name
print(v.Name)
frame.Parent = script.Parent.ScrollingFrame
frame.Visible = true
frame.Name = v.Name
end
print(SavedTable)
end)
This is what is Printed out on the Server:
And here is what is Printed out on the Client:
Please note, I have the Expressive Output window Beta Enabled. That is why I can print Tables
Thank you for any Help!
Have a Great Day