My script is showing an error that is not really a valid error to show up. The first image is shown when i hover over the errored line. The second image is the error im getting.
script.Parent.ChildAdded:Connect(function()
for i , v in pairs(script.Parent:GetChildren()) do
if v:IsA("ImageButton") then
script.Parent.Parent:FindFirstChild("Limit").Text = "wow"
end
end
end)
This the script for it and i have everything in the correct location as show in the image below.
The things i want to know :
Is this a studio bug and should I reinstall studio.
Are you using type checking? If you are try adding --!nonstrict at the very top of the script to disable it because it has some bugs that cause problems like this.
I think that’s probably because when doing FindFirstChild, it doesn’t know what Class the Instance is, hence why it’s saying it couldn’t find Text since all it knows is that Limit is an Instance.
Edit: If you would like to get rid of that error, you could just remove the FindFirstChild and reference Limit normally, but that would probably cause issues for your script