Hey so I am working on a skill tree GUI for my game. I wanted to make it so while your hovering over one of the skills it will pop up a little box on your cursor with the description of the skill and how many points it costs and stuff.
This is my code:
local hover = false
v.MouseEnter:Connect(function()
hover = true
print("HOVER")
if v:FindFirstChild("viewbox") then
local mouse = plr:GetMouse()
print(mouse.X)
print(mouse.Y)
v.viewbox.Position = UDim2.new(0, mouse.X, 0, mouse.Y)
v.viewbox.Visible = true
print(v.viewbox.Visible)
print('box set')
repeat
v.viewbox.Position = UDim2.new(0, ((mouse.X)), 0, ((mouse.Y)))
task.wait()
until hover == false
print('false')
v.viewbox.Visible = false
end
end)
v.MouseLeave:Connect(function()
hover = false
end)
This is what the box looks like
(just to prove the zindex isn’t messed up or anything like that)
When setting the position and making it visible neither of the changes take place but for some extremely odd reason the prints say otherwise?
this is extremely odd and I have no clue whats happening.
When I actually view the properties of the viewbox to see if it changes I dont see any changes despite the print saying visible is true. What is causing this??
Edit: the box itself is a child of the actual skill icon if this means anything.