So make a sort of invisible frames for hitbox to make the selection available? but then how do i prevent the same issue?
i think there is a solution inside coding like a boolean or stuff like that, only that i don’t know how to make it
Edit: Wait i may have got it
Got the solution, I had to use mouseMoved to make it check costantly
local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local UIS = game:GetService('UserInputService')
local screenGui = script.Parent
local main = screenGui.Main
local Background = main.Background
local CharacterStatsUIFolder = Background.CharacterStatsUIFolder
local ModsSelectFolder = Background.ModsSelectFolder
local MainSelectMod = ModsSelectFolder.Selection.Main
local TweenService = game:GetService("TweenService")
local data = {}
local selected = 0
for i, v:ImageLabel in MainSelectMod:GetChildren() do
if not v:IsA("ImageLabel") then continue end
data[v] = {["Pos"] = v.Position, ["Rot"] = v.Rotation, ["ZIndex"] = v.ZIndex}
v.MouseMoved:Connect(function()
if selected == 0 then
selected = i
TweenService:Create(v, TweenInfo.new(.5), {Position = UDim2.new(v.Position.X.Scale,0,1,0)}):Play()
TweenService:Create(v, TweenInfo.new(.5), {Rotation = 0}):Play()
v.ZIndex = 10
end
end)
v.MouseLeave:Connect(function()
if selected == i then
selected = 0
TweenService:Create(v, TweenInfo.new(.5), {Position = data[v]["Pos"]}):Play()
TweenService:Create(v, TweenInfo.new(.5), {Rotation = data[v]["Rot"]}):Play()
v.ZIndex = data[v]["ZIndex"]
end
end)
end