Hi, so basically I have this hover gui for items and when I switch items fast, the hover gui doesnt work.
Example of issue:
My Code:
local screenGui = script:FindFirstAncestorOfClass("ScreenGui")
local frame = script.Parent
local players = game:GetService("Players")
local player = players.LocalPlayer
local mouse = player:GetMouse()
mouse.Move:Connect(function()
local inv = player.PlayerGui.test.Main.ScrollingFrame:GetDescendants()
for i,v in inv do
if v:IsA("TextButton") then
v.MouseEnter:Connect(function()
frame.AD.Text = v.AP.Value.." Attack Power"
frame.AP.Text = v.MP.Value.." Magic Power"
frame.NameText.Text = v.WEAPONNAME.Value
frame.Rarities[v.RARITY.Value].Visible = true
frame.Sell.Text = v.SELL.Value
frame.ImageLabel.Image = v.Weapon.Image
frame.Visible = true
game:GetService("RunService").RenderStepped:Connect(function()
local location = game:GetService("UserInputService"):GetMouseLocation()
script.Parent.Position = UDim2.new(0, location.X + 5, 0, location.Y - 31)
end)
v.MouseLeave:Connect(function()
frame.Visible = false
for i, v in frame.Rarities:GetChildren() do
v.Visible = false
end
end)
end)
end
end
end)
Appreciate any help!