Still have questions? Join our Discord server and get real time help.
0

# Why does this LocalScript not work...?

IcyEvil 278
4 years ago

Trying to make a selectionBox in the torso But it seems to hate me.

while wait() do
for _,v in pairs(game.Players.LocalPlayer:GetChildren()) do
end end

local outline = Instance.new("SelectionBox")
local t = v.Character:findFirstChild("Torso")
if t then outline.Adornee = t
end



You goof, you didn't even put the selection box code in the loops! You've got your two ends immediately after your while and for lines. This means that the code between while wait() do and the last end run continuously, and the code between for _,v in pairs(game.Players.LocalPlayer:GetChildren()) do and the first end run continuously for each player.