I have a script which is supposed to make other players highlighted on the clients screen, however I am receiving errors I can’t figure out, here’s my current script, please tell me if you find something wrong with it!
local plrs = {}
local players = game.Players:GetChildren()
for i, v in pairs(players) do
table.insert(plrs, v.Name)
end
print(plrs)
game.Players.PlayerAdded:Connect(function(playa)
table.insert(plrs, playa.Name)
print(plrs)
end)
for i, v in pairs(plrs) do
local target = game.Workspace:FindFirstChild(v)
if target.Name ~= game.Players.LocalPlayer.Name then
if target.Humanoid then
if not target:FindFirstChild("Highlight") then
local highlight = script.Highlight
local hightlightc = highlight:Clone()
highlight:Clone().Parent = target
end
end
end
end
It’s enabled and the transparency is at 0, however, when a put a print(v) after the local target = game.Workspace:FindFirstChild(v), it printed nil, so it has to be something with that.