I'm coding a page system for a character customization GUI so the user can view every element without them all being on-screen at once. This code immediately comes after I set up the bulk of the system.
for _,f in pairs(tsp:GetChildren()) do for _,f2 in pairs(f:GetChildren()) do if f.Name == "page1" then -- f:GetChildren()[table.find(f:GetChildren(),f2,1)].Name tsc[f2.Name].Visible = true tsc[f2.Name].BackgroundTransparency = 0 else tsc[f2.Name].Visible = false tsc[f2.Name].BackgroundTransparency = 1 end end end
When the script reaches here, I get the error Visible cannot be assigned to
at tsc[f2.Name].Visible = false
, even though there were no issues at all for months until yesterday.
Then hours later, the error occured at tsc[f2.Name].Visible =
true
, and then an hour later the error went back to occuring at tsc[f2.Name].Visible = false
.
The error also only occurs when I set tsc[f2.Name].BackgroundTransparency
to 1
, but not to 0
. There were also no problems with this for months until yesterday.
This is hindering my progress; I saved the script and restarted ROBLOX Studio, I rearranged the code, I even rewrote a simple line to tsc[ f:GetChildren()[table.find(f:GetChildren(),f2,1)].Name ].Visible = true
to get the specific name of f2
, and the error still occured when set to false
, and now when set to true
.
Help is greatly appreciated!
Is the ".Name" getting the literal name of the frame and not the frame inside of it named "Name" if that's what you need? That could be why it's acting up sense you can't set a frame's "Name" with visible properties. Not sure how you have your gui's set up though.