Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why is My SelectionBox script Not working Correctly?

Im wanting the color of The SelectionBox to be Really black, But Instead it Goes to its default color, Any reason why???

while wait() do
 for _,v in pairs(game.Players:GetChildren()) do
	local torso = v.Character:findFirstChild("HumanoidRootPart")
	if torso:IsA("Part") then
		x = Instance.new("SelectionBox")
		x.Parent = torso
		x.Adornee = torso
	end
	local find = v.Character.HumanoidRootPart:findFirstChild("SelectionBox")
	if find then
		find.Color = "Really black"
	end
end
end


1 answer

while wait() do
 for _,v in pairs(game.Players:GetChildren()) do
    local torso = v.Character:findFirstChild("HumanoidRootPart")
    if torso:IsA("Part") then
        x = Instance.new("SelectionBox")
        x.Parent = torso
        x.Adornee = torso
    end
    local find = v.Character.HumanoidRootPart:findFirstChild("SelectionBox")
    if find then
        find.Color = BrickColor.new("Really black") --It's a brick color. Therefore, you need BrickColor.new.
    end
end
end

2 comments

0

xD I had originally find.BrickColor = BrickColor.new("Really black") xD

0

Still sets it to default

This discussion is preserved as it was. New answers, comments, and votes are closed.