Module script located in ReplicatedStorage:
local Players = game:GetService('Players')
local PlayerDictionary = {}
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
PlayerDictionary[Character.Name] = {
['Parrying'] = false,
['Blocking'] = false,
['Disabled'] = false,
['Attacking'] = false,
['Ragdolled'] = false,
}
end)
end)
return PlayerDictionary
Server-sided script located in ServerScriptService:
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local PlayerDictionary = require(ReplicatedStorage.PlayerDictionary)
task.wait(3)
print(PlayerDictionary)
Local script located in StarterPlayerScripts:
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local PlayerDictionary = require(ReplicatedStorage.PlayerDictionary)
task.wait(3)
print(PlayerDictionary)
My output:
Expected:
I expected the local script to return the same value as the server script. Why is the table empty for only the local script but not for the server script?