Issue with surface gui

I’m trying to make it so this GUI button (child of a surface GUI) is able to be clicked, however my script works but I noticed that I can only click the button from a very specific camera angle. image
Any other position like looking at it this way does nothing.
image

I’ve tried adjusting all kinds of properties and referred to a dev forum post with a similar problem but their solve doesn’t fix mine.

Here’s the structure if it helps:
image

1 Like

You’ve parented the script (I assume which handles mouse clicks) to a TextLabel instance not a TextButton instance.

its not the “!!” the script is in starterplayerscripts, could you explain what you mean by this

I just saw that the TextLabel instance had an option to be expanded, I assumed you had placed the script there. Could you share the contents of the script here?

No thats not where the script is, theres no script being placed inside of it.

Copy and paste the contents of the script here so we can see how it co-operates with the user interface.

				for ci , cv in pairs(v2) do
					
					local c = cm.UIHOLDER.ui.ScrollingFrame.storage.LI:Clone()
					
					c.Visible = true
					
					c.Text = ci
					
					c.Parent = cm.UIHOLDER.ui.ScrollingFrame
					
					
					--create click
					
					c.MouseButton1Click:Connect(function()
						
						--Load Item
						
						print("Clicked")
						
						local model = Instance.new("Model", cm.placement.parts)
						
						model.Name = ci
						
						for ii, vv in pairs(v2[model.Name]["instance"]) do
							
							print( type(vv))
							
							local ccc = vv
							
							ccc.Parent = model
							
						end
						
						model:MoveTo(cm.placement.Position)
						
						
					end)				

--a fragment of the script

Can you include the declarations of the variables named “v2” and “cm” for context?

1 Like

v2 is a table containing instances of a tool, it doesnt have anything to do with the gui part of this.

cm is CraftingModel, the model in the worksapce that holds the gui

local cm = workspace.CraftingModel

local cs = workspace.CraftingSys

Did you try to use a click detector?

have you tried elevating the part in which the surface gui is on, there could be some sort of invisible part blocking clicking

yeah that’s what it is. not sure what else could be the problem.

Yup I did, I mentioned that I read this off of another dev forum post with this issue. That didn’t work.