Hello i have made a game on roblox called Taco.EXE and i'm starting to have bugs with it already. ok so the error im getting is attempt to index nil with 'UI' i don't know exactly what this means i'm confused why it does this. because i set it to the right directory and everything. i honestly have no clue what it can be please leave suggestions down below. thanks
Also The Script Is a LocalScript,Inside StarterGui not in any UI's
function fadeOutCredits()
for i = 1,10,1 do
wait(0.1)
script.Parent.UI.Credits.TextTransparency += 0.1
end
end
function fadeInCredits()
for i = 1,10,1 do
wait(0.01)
script.Parent.UI.Credits.TextTransparency -= 0.1
end
end
game.Workspace.Tacos.Taco.Choice2.OnClientEvent:Connect(function()
script.Parent.UI.Credits.Text = "Created By AxisAgent"
wait(1)
fadeOutCredits()
wait(1)
script.Parent.UI.Credits.Text = "Published By AxisAgents Meme Gang"
fadeInCredits()
wait(1)
fadeOutCredits()
wait(1)
script.Parent.UI.Credits.Text = "Song: Gangsta 4 Lyfe"
fadeInCredits()
wait(1)
fadeOutCredits()
end)
game.Workspace.Tacos.Taco.Choice3.OnClientEvent:Connect(function()
script.Parent.UI.Enabled = true
script.Parent.UI.Credits.Text = "Created By AxisAgent"
wait(1)
fadeOutCredits()
wait(1)
script.Parent.UI.Credits.Text = "Published By AxisAgents Meme Gang"
fadeInCredits()
wait(1)
fadeOutCredits()
wait(1)
script.Parent.UI.Credits.Text = "Song:Eterna City(Night)"
fadeInCredits()
wait(1)
fadeOutCredits()
end)

4 comments
Is there any GUIs in StarterGUI called UI?
The error means that the Object's in which the desired member of reference resides is nil. In this case, that means 'script.Parent'. That cannot be, so I am curious as to which line is erroring, or if this is even the faulty script to begin with.
could i do a findfirstchild or waitforchild ?
the weirdest thing about this is it works from 14 to 28. but not 29 to 44