script.Parent.MouseButton1Click:Connect(function()
for i,v in pairs(script.Parent.Parent.Parent:GetChildren()) do
if v.Name ~= "topBar" then
if v:IsA("Frame") then
v.Visible = false
end
end
end
if script.Parent.Parent:FindFirstChild(script.Parent.frameName) ~= nil then
script.Parent.Parent:FindFirstChild(script.Parent.frameName).Visible = true
end
I am not sure if the errors are related to the script but what is frameName? Is it a value? If it is, remember to add .Value after the frame name:
if script.Parent.Parent:FindFirstChild(script.Parent.frameName.Value) ~= nil then
script.Parent.Parent:FindFirstChild(script.Parent.frameName.Value).Visible = true
end
I am saying that because I have never seen a property that is called frameName.
Hopefully that fixes it
I got an error similar to this and it ended up resetting my draft to an empty script when I tried to commit all of my drafts in team create. This seems to be a studio bug.