Okay so, basically im currently trying to make a system where if you hover your mouse over a surface gui product, it will move a ui towards your mouse showing what you will recieve from buying it. It seems that without a single line of code (which gets the product info) it will not go to the mouse position. Im not sure why so i would appreciate if someone could help me.
v.MouseEnter:Connect(function()
local price = game:GetService("MarketplaceService"):GetProductInfo(v.AssetId.Value).PriceInRobux -- IF GET PRODUCT INFO IS REMOVED IT WILL NOT GO TO THE MOUSE POSITION
local conversion = math.round(price / game.ReplicatedStorage.RobuxToCoinConversion.Value)
local mouse = game.Players.LocalPlayer:GetMouse()
script.Parent.MainPopups.Position = UDim2.new(0, mouse.X , 0, mouse.Y)
script.Parent.MainPopups.Price.Text = price
script.Parent.MainPopups.Coins.Text = conversion.." coins"
script.Parent.MainPopups.Visible = true
activeonbutton = true
button = v
end)