#How to fix [TextLabel].MouseEntered not being detected sometimes
1 messages · Page 1 of 1 (latest)
SelectCaseBtn.Activated:Connect(function()
local List = PcCaseList:FindFirstChild("List") :: ScrollingFrame
local Description = PcCaseList:FindFirstChild("DescriptionOutline"):FindFirstChild("Description")
PcCaseList.Visible = true
for _, case in ipairs(List:GetChildren()) do
print(case)
if case:IsA("TextLabel") and not case:GetAttribute("Connected") then
case:SetAttribute("Connected", true)
print("IsA Label")
case.MouseEnter:Connect(function()
print("MouseEnter")
local SSD = Description:FindFirstChild("2.5")
local HDD = Description:FindFirstChild("3.5")
local Depth = Description:FindFirstChild("Depth")
local FFS = Description:FindFirstChild("FormFactorSupport")
local FIO = Description:FindFirstChild("FrontIO")
local Height = Description:FindFirstChild("Height")
local Manufacturer = Description:FindFirstChild("Manufacturer")
local MGPUL = Description:FindFirstChild("MaxGPULength")
local Volume = Description:FindFirstChild("Volume")
local Width = Description:FindFirstChild("Width")
SSD.Text = "2.5\": " .. case:FindFirstChild("SSD bays").Value
HDD.Text = "3.5\": " .. case:FindFirstChild("HDD bays").Text
Depth.Text = "Depth " .. case:FindFirstChild("Dimensions").Value.Z .. "mm"
local typeValue = case:FindFirstChild("Type").Text
if typeValue == "ATX" then
FFS:FindFirstChild("ATX").BackgroundColor3 = Color3.fromRGB(0, 255, 0)
FFS:FindFirstChild("MicroATX").BackgroundColor3 = Color3.fromRGB(0, 255, 0)
FFS:FindFirstChild("MiniITX").BackgroundColor3 = Color3.fromRGB(0, 255, 0)
elseif typeValue == "MicroATX" then
FFS:FindFirstChild("ATX").BackgroundColor3 = Color3.fromRGB(255, 0, 0)
FFS:FindFirstChild("MicroATX").BackgroundColor3 = Color3.fromRGB(0, 255, 0)
FFS:FindFirstChild("MiniITX").BackgroundColor3 = Color3.fromRGB(0, 255, 0)
else
FFS:FindFirstChild("ATX").BackgroundColor3 = Color3.fromRGB(255, 0, 0)
FFS:FindFirstChild("MicroATX").BackgroundColor3 = Color3.fromRGB(255, 0, 0)
FFS:FindFirstChild("MiniITX").BackgroundColor3 = Color3.fromRGB(0, 255, 0)
end
FIO.Text = "Front I/O (USB): " .. case:FindFirstChild("FrontIO").Value
Height.Text = "Height: " .. case:FindFirstChild("Dimensions").Value.X .. "mm"
Manufacturer.Text = "Manufacturer: " .. case:FindFirstChild("Manufacturer").Value
MGPUL.Text = "Max GPU Length: " .. case:FindFirstChild("MaxGPULength").Value .. "mm"
Volume.Text = "Volume: " .. case:FindFirstChild("Volume").Value .. "L"
Width.Text = "Width: " .. case:FindFirstChild("Dimensions").Value.Y .. "mm"
end)
end
end
end)
Had to split it to 2 chunks because discord is stupid
Fixed