I have a local script in a ScreenGui which is meant to get all descendants with the name ClickDetector and if the mouse hovers enters/leaves or clicks it changes the size of some images but I don't think it can find any descendants in the workspace when there are some, just get the error attempt to index nil with connect or function.
local ClickDetector = game.Workspace:GetDescendants("ClickDetector")
local Ring = script.Parent:FindFirstChild("Ring")
ClickDetector.MouseHoverEnter:Connect(function()
Ring.Size = UDim2.new(0, 20, 0, 20)
end)
ClickDetector.MouseHoverLeave:Connect(function()
Ring.Size = UDim2.new(0, 15, 0, 15)
end)
ClickDetector.MouseClick:Connect(function()
Ring.Size = UDim2.new(0, 10, 0, 10)
wait(0.5)
Ring.Size = UDim2.new(0, 15, 0, 15)
end)
Could someone point out what I've done wrong? Thanks!

2 comments
So I think thats solved that part of it but now I'm getting the error attempt to index nil with 'MouseHoverEnter'
Oh ok ill try to fix that