Text label while loop not working

while true do
script.Parent.Text.TextColor3.fromRGB(255,255,255)
wait(0.5)
script.Parent.Text.TextColor3.fromRGB(0,0,0)
wait(0.5)

end

Error - Attempt to index nil with ‘fromRGB’

What I’m trying to do here is to create a blinking effect in my loading screen GUI by changing the texts colors but this isn’t working.

while true do
    script.Parent.TextColor3 = Color3.fromRGB(255,255,255)
    wait(0.5)
    script.Parent.TextColor3 = Color3.fromRGB(0,0,0)
    wait(0.5)
end

there

1 Like