This might seem kind of funny, but I would like to create a script that basically flashes the neon DDR arrow lights that are on the ground in sync with the animation. Do I have to script each individual flash on an interval or is there an easier way?
What are you asking here? If you can somehow pull the data out of the video to get the required intervals? All flashes seem to be the same length so you can assign them as variables and just activate them in a specific order, with task.wait to create the longer pauses. If there is a repeating pattern, you can just have that sequence as a variable as well and just replay it.
You could script each individual flash, but that can get cumbersome. I would use a loop to manage the flashing with a simpler approach.
I’m asking if there’s an easier way to script the flashing other than having each on a set time
You could try using TweenService and call it every time you want to flash an arrow.
local TweenService = game:GetService("TweenService")
local arrowFolder = workspace:WaitForChild("Arrows") -- Folder containing all the neon parts
local flashInterval = 0.5 -- Time in seconds between flashes
local flashColor = Color3.new(1, 0, 0) -- The color to flash (red in this example)
local defaultColor = Color3.new(0, 1, 0) -- The default color of the arrows (green in this example)
-- Tween information
local tweenInfo = TweenInfo.new(
flashInterval / 2, -- Time to complete the tween
Enum.EasingStyle.Linear,
Enum.EasingDirection.InOut,
-1 -- Repeat count (-1 means infinite)
)
-- Function to create tweens for each arrow
local function createTweens()
for _, arrow in ipairs(arrowFolder:GetChildren()) do
if arrow:IsA("BasePart") then
-- Create a tween to flash the arrow
local goal = {Color = flashColor}
local tween = TweenService:Create(arrow, tweenInfo, goal)
tween:Play()
end
end
end
-- Start flashing arrows
createTweens()
Yeah this might be able to work. Thanks.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.