So, hello! I was making a menu GUI. I finished coding and went to test. Nothing happened. (Local Script) Code:
-- The IDs
openid = "5232239597"
closeid = "5232247205"
script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Image == "http://www.roblox.com/asset/?id="..openid then -- If its the open button
script.Parent.Parent.MenuOptions.Visible = true
script.Parent.Image = "http://www.roblox.com/asset/?id="..closeid -- Open and set it to close
end
if script.Parent.Image == "http://www.roblox.com/asset/?id="..closeid then -- If close
script.Parent.Parent.MenuOptions.Visible = false
script.Parent.Image = "http://www.roblox.com/asset/?id="..openid - Close and set open
end
end)
Please help, Thanks, Blxefirx/Blue

1 comment
actually in lua it does not matter if you have space or not, you can write script. Parent and it will work :)