Roblox studio wont let me reference the visibility of an image button

No, you are not. You have to reference the local players LocalPlayer.PlayerGui because everything in StarterGui is copied into LocalPlayer.PlayerGui once and not again, so you will have to edit it in the local player, you cannot edit it in the startergui.

Yes I am. I already tried that and neither worked. Still the same exact issue, it won’t let me reference .visibility.

Everything works except it simply won’t let me reference the visibility, if I reference the screen gui it’s self I can reference the vis but if I go into the screen gui to reference the imagebutton like I need to then I can’t reference the visibility.

local frame = script.Parent
local originalPosition = frame.Position
local isMoved = false
local playerSV = game:GetService("Players")
local client_player = playerSV.LocalPlayer
local playerGUI = client_player.PlayerGui 

frame.MouseButton1Click:Connect(function()
	if isMoved then
		frame:TweenPosition(originalPosition, "Out", "Quad", .2, true)
		isMoved = false
playerGUI.SettingsMenu.Open1.Visible = true

	else
		frame:TweenPosition(UDim2.new(8.71, 0,2.19, 0), "Out", "Quad", .2, true)
		isMoved = true
		print("work")
playerGUI.ShopMenu.Open2.Visible = true

	end
end)

I’ve tried local and regular scripts. If you’d like to see the script for the button to change visibility for the other buttons then here it is:

Everything works except referencing .Visibility.

local frame = script.Parent
local originalPosition = frame.Position
local isMoved = false
local playerSV = game:GetService("Players")
local client_player = playerSV.LocalPlayer
local playerGUI = client_player.PlayerGui 

frame.MouseButton1Click:Connect(function()
	if isMoved then
		frame:TweenPosition(originalPosition, "Out", "Quad", .2, true)
		isMoved = false
playerGUI.SettingsMenu.Open1.Visible = true

	else
		frame:TweenPosition(UDim2.new(8.71, 0,2.19, 0), "Out", "Quad", .2, true)
		isMoved = true
		print("work")
playerGUI.ShopMenu.Open2.Visible = true

	end
end)

Just want you to try little thing put isMoved = false after the playerGUI.SettingsMenu.Open1.Visible = true

I entered that in and if it did anything I wouldn’t know because the issue is that roblox literally won’t reference visibility. I’ll send a screenshot showing that when I type .V visibility doesn’t pop up and another one just doing . to show you other things pop up such as name.

Ok so the video doesn’t show it but that’s what’s happening.

What’s open1 object type? is it a frame,text button…

It is an image button inside of a screen ui.

put print after the isMoved and after you declare visibility to true

after that I added

frame.MouseButton1Click:Connect(function()
	if isMoved then
		frame:TweenPosition(originalPosition, "Out", "Quad", .2, true)
		isMoved = false
		playerGUI.SettingsMenu.Open1.v = true
		isMoved = false
		print ("test")

And it failed to print in output.
Did you want me to delete the first isMoved

ok try this instead

frame.MouseButton1Click:Connect(function()
	if isMoved then
		frame:TweenPosition(originalPosition, "Out", "Quad", .2, true)
		--isMoved = false
		playerGUI.SettingsMenu.Open1.Visible = true
        --I can't do it but please check it's the correct path to Open1
		print ("test")

Although it doesn’t change the visibility, it prints test now but it also doesn’t move the button anymore.

Alright I added isMoved and it works the same as before except now it prints work when you turn it on and prints test one you click it a 2nd time to turn it off

Well at this point I think it’s technical problem in your Roblox studio, I don’t understand why it wouldn’t work atp sorry.

Well thanks for the help, It’d have worked by now if it just let me reference the visibility but when I do playerGUI. then it lets me double click SettingsMenu, then it lets me double click Open1, but then it doesn’t let me double click Visible. Even though that’s clearly a variable. Not sure why but you might be right and it could be a bug.

It works fine for me, it’s probably that Open1 is not created yet.

It was created weeks ago and is correctly referenced.