Hey developers! I am currently making a checkout system utilizing SurfaceGuis. I am using an adornee.
Here’s my code for registering clicks:
for _, Frame in pairs(script.Parent.Items:GetChildren()) do
if Frame:IsA("Frame") then
Frame.Click.MouseButton1Down:Connect(function()
print(Frame.Name)
local Found = table.find(SelectedItems, Frame.Name)
if Found then
table.remove(SelectedItems, Found)
else
table.insert(SelectedItems, Frame.Name)
end
UpdateItemFrames()
end)
end
end
The issue is that it is only working for the top 2 buttons (clicks on the bottom 2 buttons and confirm are not registering!), which doesn’t make sense because all the buttons are exactly the same apart from name and an image id:
It’s possible the Z-Index is incorrect.
Confirm whether the Z-Index property of the button is greater than the ImageLabel’s for the bottom two buttons.
Do the GuiObjects named “Cick” match the size of their containing frames? Are they positioned correctly at each corner? Are the frames divided equally in size on the BasePart instance they are on?
screenguirepro.rbxl (62.3 KB)
I have this repro place here…
Would appreciate if anyone has the time to check it out and see if you can work out what’s going wrong.
It has something to do with the properties of the SurfaceGui. After some playing around, I enabled AlwaysOnTop and it seemed to fix it, although it comes up a little brighter.