So problem is when Player1 tries to place, it’s only taking into account Player2s stuff so, big problem is, every new player that joins, will be working fine, but all the older players wont have it working. So how can I get the remote function to work with this inheritance stuff correctly?
I need to use RemoteFunction too, as I return stuff from it, a lot easier than having to do client-server-client with a RemoteEvent
-- when player joins, fire this
function PlotManager:new(player)
self.Owner = player
self.PlayerData = PlayerData[self.Owner.UserId]
self.Coords = {}
self.PlotLoaded = false
print("New plot for", player.Name)
-- Get all modules
for _, v in pairs(script:GetChildren()) do
local Module = require(v)(self)
self.Maid:GiveTask(Module)
end
end
-- this is a module under PlotManager
function PlaceBlock:new(handler)
self.Handler = handler
print("New PlaceBlock module for", self.Handler.Owner)
Functions.PlaceBlock.OnServerInvoke = function(player, block, cFrame, slab, textureInfo)
print(player, self.Handler.Player)
end)
end