There’s instances in the unique references that I can’t figure out how to clean.
I have a script that basically makes cutscenes for the player, and the player instance appears in the unique references for some reason.
I have a picture to show u, and I labeled what line it occurs in.
function CutsceneServiceServer.init(self: CutsceneServiceServer)
for _, player : Player in Players:GetChildren() do
player.CharacterAdded:Connect(function() -- Line where it errors
self:PlayCutscene("Blackhole", player)
end)
end
Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
self:PlayCutscene("Blackhole", player)
end)
end)
Players.PlayerRemoving:Connect(function(player)
if self.PlayersInCutscene[player.UserId] then
local cutsceneInfo = CutscenseInfo.Scenes[player.UserId]
self.PlayersInCutscene[player.UserId] = nil
else
print("Not in scene")
end
end)
endzs
