oh the script wasn’t fully written out correctly,
please rewrite
:GetChildren()
correctly
oh the script wasn’t fully written out correctly,
please rewrite
:GetChildren()
correctly
This has a few spellings errors (which it looks like you corrected) but it would work better than hand making a table, as get children returns a table.
:GetChildren()
instead of :GetChildren())
?
for i, v in ipairs(folder:GetChildren()) do
if v:IsA("ImageButton") then
v.Visible == true
end
end
Just to clarify I put this in the textButton script:
textButton.MouseButton1Click:Connect(function()
textButton.Visible = false
ImageLabel.Visible = false
background.Visible = true
for i, v in ipairs(folder:GetChildren()) do
if v:IsA("ImageButton") then
v.Visible == true
end
end
end
end)
It comes out as an error because there is two “==” says it expected assigment or a function call in the output
I put one “=” sign and it comes out as the same result as before with it saying visible in the properties but not actually being visible.
Delete one “end” as shown in the picture
I had already done that but i forgot to mention.
oh, make it one “=” instead of two “==”
simple mistakes like this are always so annoying
I mentioned it in the previous post:
ye my brain wasn’t braining I was busy looking at dinosaurs, does it solve the problem tho?
No, it does not unfortunately.
Well then, the only problem I can think of is that you are either using a server script or a local script incorrectly, which I heavily doubt that you are, so it’s most likely not, unless it is. The problem is probably way simpler than we are probably making it, but I don’t know your game layout so I can’t help out as much. I would suggest rewriting it from scratch and making it easier to use. I don’t have enough context to help you fully.
I could send you screenshots of the workspace and the screengui if that would help. And if i was using the local script wrong how could I tell?
You can try, please show the inside of each part within the UI’s too if you know what I mean. and show the full script.
It was just a thought, which I said I heavily doubt you are using it wrong.
Here is the StarterGui, i only opened the first imagebutton because its the same in all of them and so that i can show other guis.
The script with the problem is the second script, the one that shows all the image buttons. Could you circle that or tell me which one that is in the explorer?
Assuming the 2nd script is:
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local textButton = script.Parent
local ImageLabel = script.Parent.Parent
local background = script.Parent.Parent.Parent.Background
local CamPart = game.Workspace.CamPart -- The part that camera changes its view to
local spawnlocation = game.Workspace.SpawnLocation
local currentcamera = game.Workspace.CurrentCamera
local folder = game.StarterGui.ScreenGui.Imagebuttons
--table with all of the imagebuttons
local buttontable = {folder.ImageButton, folder.ImageButton1, folder.ImageButton2, folder.ImageButton3, folder.ImageButton4, folder.ImageButton5, folder.ImageButton6, folder.ImageButton7, folder.ImageButton8, folder.ImageButton9, folder.ImageButton10, folder.ImageButton11, folder.ImageButton12, folder.ImageButton13, folder.ImageButton14, folder.ImageButton15, folder.ImageButton16, folder.ImageButton17, folder.ImageButton18, folder.ImageButton19, folder.ImageButton20}
wait(0.1)
ImageLabel.Visible = true
currentcamera.CameraType = Enum.CameraType.Scriptable
currentcamera.FieldOfView = 55
currentcamera.CFrame = CamPart.CFrame -- changes the cameras view to the view of the part
textButton.MouseButton1Click:Connect(function()
textButton.Visible = false
ImageLabel.Visible = false
background.Visible = true
for i, v in ipairs(folder:GetChildren()) do
if v:IsA("ImageButton") then
v.Visible = true
end
end
end)
This is the location of that script in the explorer:
But since the script is working (because its showing visible in the properties) i assume the problem would be fixed by just redoing the script or the image buttons?
I assume this is in StarterPlayerGui?
It is located inside the starter gui.
StarterGui > ScreenGui > ImageLabel > TextButton > LocalScript
so I assume youve shown the 2nd script as said, what’s the first?
In blue