I fired the event twice with 2 different objects and yet when I print it the dictionary only has 1 value
ServerScript:
plr.Character.Remote:FireClient(plr,Obj1,1)
plr.Character.Remote:FireClient(plr,Obj2,2)
Localscript:
local Pets = {}
script.Parent.OnClientEvent:Connect(function(Obj,Val)
print(Pets)
Pets[Obj] = Val
print(Pets)
end)
Output: – both times the first print returns an empty table and 2nd one only has 1 value
{}
[Instance(1A61A26DC88)] = "1"
How do i insert a dictionary into the table without clearing it