I want it so when the mouse exits the gui object the event connection breaks
but right now if I mouse leave fast the event doesn’t disconnect
if v.Name == "Bundle1" or v.Name == "Bundle2" or v.Name == "Crates" then
v.InputBegan:Connect(function()
connection = runService.RenderStepped:Connect(function()
if viewportFrame ~= nil then
local worldModel = getWorldModel(viewportFrame)
local Model = worldModel:FindFirstChild("Handle")
if Model then
Model.CFrame = Model.CFrame * CFrame.fromEulerAnglesXYZ(0, 0.01, 0)
end
end
end)
end)
v.InputEnded:Connect(function()
connection:Disconnect()
end)
end