Greetings, i have some problems at animation events:
So i’ve got an animation event called ‘Color’ in the animation X, with parameter: ‘3_Color_230, 100, 200’, the first number specifies the light name, and the last 3 consecutive numbers specify the color to be changed to, here is what i made but doesn’t seem to work:
any help please?
x:GetMarkerReachedSignal("Color"):Connect(function(p1)
print("Attempt Color: "..tostring(string.sub(p1, 1, 1)));
local Light = workspace:WaitForChild("OutpostCutscene"):WaitForChild("MidOutpostCutscene"):WaitForChild("Elevator RIG"):WaitForChild("Light"):WaitForChild("BeamLight"):WaitForChild("Neon"):FindFirstChild(tostring(string.sub(p1, 1, 1)));
if Light then
local value = string.sub(p1, 9);
if value then
Light.Color = Color3.fromRGB(tonumber(value));
end
end
end)
(Also asked chat gpt, yet complete trash.)