For some reason Surface GUI is not working I have a Imagebutton for a frame to open and close but when I try and click the button it's not highlighting with the black mouse arrow so I don't know what is wrong here's the script I'm using,
local List = script.Parent.Parent.List local OpenClose = script.Parent local bounce = false script.Parent.MouseButton1Click:connect(function() if bounce == false then List:TweenSizeAndPosition(UDim2.new(0,500,0,300),UDim2.new(0,150,0,250),"Out","Back",1) OpenClose:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Back", 1) wait(1) bounce = true elseif bounce == true then List:TweenSizeAndPosition(UDim2.new(0,0,0,0),UDim2.new(0,150,0,250),"Out","Back",1) OpenClose:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Back", 1) wait(1) bounce = false end end)
SurfaceGuis that are parented to bricks don't support buttons the way you're trying to get them to. In order to make the button work you need to put your SurfaceGui in StarterGui, then make a script to set the SurfaceGui's Adornee property to the brick you want it to be on. If the button is updating anything in your Gui you may want to use an intValue, or a stringValue like so to update it on everyone's screen:
value = game.ReplicatedStorage.stringValue button = script.Parent.Button label = script.Parent.Label value.Changed:connect(function() label.Text = value.Value end) button.MouseButton1Click:connect(function() if value.Value == "Hello" then value.Value = "World" else value.Value = "Hello" end)