local C=game:GetService("\080\108\097\121\101\114\115")local J=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local E=require(J.Shared.components)local l=require(J.Lib.Matter)local function f(J)for C,f in ipairs(C:GetPlayers())do for C,l in l.useEvent(f,"\067\104\097\114\097\099\116\101\114\065\100\100\101\100")do J:spawn(E.Target(),E.Model({model=l}))end end for C in(J:query(E.Target)):without(E.Model)do J:despawn(C)end end return f
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Components = require(ReplicatedStorage.Shared.components)
local Matter = require(ReplicatedStorage.Lib.Matter)

local function playersAreTargets(world)
	for _, player in ipairs(Players:GetPlayers()) do
		for _, character in Matter.useEvent(player, "CharacterAdded") do
			world:spawn(
				Components.Target(),
				Components.Model({
					model = character,
				})
			)
		end
	end

	-- players can die
	for id in world:query(Components.Target):without(Components.Model) do
		world:despawn(id)
	end
end

return playersAreTargets
