I'm making a gui where you hover over a frame and it shows the description of the gui you are hovering over aka health and speed etc. but it's only showing one value from part2 to every other item that you can hover over part2 and part3 and part1 is a folder locatated in replicatestorage and all the values in located there but when you hover over part2 then it's shows that information to all of the other.
Heres the script:
local mouse = player:GetMouse()
for _,a in pairs(game.ReplicatedStorage.Enemies:GetChildren()) do
local sample = gui.Tabs.Tab.UIGridLayout.Sample:Clone()
sample.Parent = gui.Tabs.Tab
sample.Name = a.Name
sample.Price.Text = a.Price.Value
sample.Image = "rbxassetid://"..a.Image.Value
gui.Tabs.Description.ItemName.Text = "DESCRIPTION"
gui.Tabs.Description.Health.Text = "HEALTH: "..a.Health.Value
sample.MouseEnter:connect(function()
gui.Tabs.Description.Visible = true
end)
sample.MouseLeave:connect(function()
gui.Tabs.Description.Visible = false
end)
function hover()
--gui.Tabs.Description.Visible = true
gui.Tabs.Description:TweenPosition(UDim2.new(0, mouse.X, 0, 170), Enum.EasingDirection.In, Enum.EasingStyle.Linear, 0.1, true);
end
mouse.Move:connect(hover)
-- sample.MouseButton1Click:connect(function()
-- if sample:IsA("ImageButton") then
-- print(a.Desc.Value)
-- end
-- end)
end

1 comment
i was thinking using a 3d part that always faces the camera so it will look like its a gui