Yo! So recently I’ve been working on some UI/Camera based game, and it all worked finr untill I have stumbled a weird issue. Honestly I am puzzeled, so let me get some context.
--!strict
local positions = script:GetChildren()
game.ServerScriptService.BindableEvents.OnPlayerJoin.Event:Connect(function(player : Instance, ScreenResolution : string)
print(ScreenResolution)
local PlayerPlotFolder = game.Workspace.PlayerFloat.PlayerPlot.Presets.PlotDataFolderPreset:Clone()
PlayerPlotFolder.Name = player.Name
PlayerPlotFolder.Parent = game.Workspace.PlayerFloat.Players
for _,v in pairs(positions) do
if not v:GetAttribute("Taken") then
v:SetAttribute("Taken", true)
PlayerPlotFolder.PlayerPlotInternalData.Poistion.Value = v.Value
local PlayerGameZone : any
PlayerGameZone = game.ReplicatedStorage.PlayerPlotAssets.PlayerPlotPages:FindFirstChild(ScreenResolution):Clone()
PlayerGameZone.Parent = PlayerPlotFolder
PlayerGameZone:MoveTo(v.Value)
PlayerGameZone.Name = "PlayerPlotModel"
break
end
end
end)
This code right here, once a player join assigns them a “plot” which is just a Vector3 value. As far as i checked that part worked all right and each player got different coordinates. What this snippet does it essnetially copy a model from replicated storage and paste it into the respective player folder in workspace.
Model that is being copied along with all its descendants:
As seen on the server side screenshot below eveything seems to be quite right: We have 2 players in the local test, each gets their model copied at different coordinates,. Okay, wonderfull!
For a little context these will be sort of pages /windows that you move using awsd, where by pressing a you move to the page on your right. (Below a little demonstartion)
( the camera gets switched between two camera parts, (CameraPosition parts from the explorer screenshot above) (I also made them on vectors so they’re easily expandable but thats aside from the topic)
Now here’s what happens when i press local playtest
Well so obviosuly i looked what was the issue and to my suprise the parts just werent there. camera parts that came along the duplicated model just were non existent on the second client. Let me show a depiction of what i am reffering to
Player 2 litteraly has no CameraPosition Parts even though they all should have been there? Well my first guess was that silly me made a mistake somewhere a small one. But to my suprise they parts are there on the server side???
Server side image above^^
So to my understanding The fact that the parts are missing somehow replicated to both clients??? Yet not the server? I have no idea why that is and i was even more suprised seeing that the partss are still rendered by the server. Especially that the sciprt responsible for moving the models is server side.
Any help or explanation would be appreactied Thank you in advance! I can provide more code snippest but only these are reponsible for dupiclating the model itself.