remote.OnServerEvent:Connect(function(player)
local profile = moduleScript.GetProfile(player)
profile.Clicks += 1
print(“clic”)
for _,player in game:GetService(“Players”):GetPlayers() do
print(moduleScript.GetProfile(player))
end
end)
local uis = game:GetService(“UserInputService”)
uis.InputBegan:Connect(function(key,bool)
if key.UserInputType == Enum.UserInputType.MouseButton1 then
game:GetService(“ReplicatedStorage”):WaitForChild(“RemoteEvent”):FireServer()
end
end)
We would need to see the code for your module script.
The problem is either that your module is always returning the same table regardless of the inputted player or that they are all set to the same table.
Tables act kind of like instances rather than primitive values such as strings and numbers: when you pass them around they are passed as references to a single object.
So for example, if you passes a part like so:
local template = Instance.new("Part")
template.Name = "Template"
myTable["1"] = template
myTable["2"] = template
myTable["1"].Name = "Edited"
print(myTable["2"].Name) -- Prints "Edited"
See how it modifies both? To avoid this you first need to make a copy:
local template = Instance.new("Part")
template.Name = "Template"
myTable["1"] = template:Clone()
myTable["2"] = template:Clone()
myTable["1"].Name = "Edited"
print(myTable["2"].Name) -- Prints "Template"