Hello, I would like to know how I can do so that I can be seen with the name of the model.
while true do
for i = 1,8 do
script.Parent.Part[i].BrickColor = BrickColor.new("New Yeller")
wait(0.5)
script.Parent.Part[i].BrickColor = BrickColor.new("Really black")
end
end
In short I want to turn on a sequence of parts and turn them off but the problem here is that I don’t know how to introduce the value “i” in the call of the model.
I would just like to know how to introduce “i” in the script so that on turn 1 part 1 turns on and off then on turn 2 it is part 2 which turns on and off, etc…
local players = game:GetService("Players")
local model = script.Parent
local cooldown = 0.5
local function Function()
for _, part in ipairs(model:GetChildren()) do
if part:IsA("Part") then
for count = 1, 8 do
if part.Name..count then
part.Color = Color3.fromRGB(255, 255, 127)
wait(cooldown)
part.Color = Color3.fromRGB(0, 0, 0)
wait(cooldown)
end
end
end
end
end
players.PlayerAdded:Connect(function(player)
player.CharacterAppearanceLoaded:Connect(function(character)
Function()
end)
end)
somebody can fix the code because i have to go to an event