Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to find only character models in workspace?

Asked by 5 years ago

Hey im trying to find a way to only find models with humanoids in workspace (players), but i can't seem to find a function for that, or get all character models from game:GetService("Players") , i know that every player in that list has a property called Character, but i dont know how to find the Character of everyone else, to clone into only one model (lighting), can someone help me?

1 answer

Log in to vote
1
Answered by
Epuuc 74
5 years ago
for _,plr in pairs(game.Players:GetPlayers()) do
    plr.Character:Clone().Parent = game.Lighting.Model
end

Is a simple way of doing it. Goes through all the players, clones their characters and moves it to a model in Lighting.

0
Thank you! Igoralexeymarengobr 365 — 5y
Ad

Answer this question