I’m not sure if this is a bug, but I’ve been encountering this really bizarre issue and wasn’t sure where else to post it.
For dragging a UI object, I’m positioning it to the mouse on RenderStepped.
This is the code(both for the plugin and the local script in-game)
local function fn()
frame.Position=UDim2.new(0,Mouse.X,0,Mouse.Y);
end
game:GetService("RunService"):BindToRenderStep("mouse",Enum.RenderPriority.Last.Value,fn)
This works fine in game in a starterplayerscript
https://i.gyazo.com/e4423ef29e87b20bf97f5e2d548e8fe0.mp4
In a plugin however, with the same source, you can see how it trails behind
https://i.gyazo.com/fd7e0171a6328c5364884e52e761c3ef.mp4
It’s almost as if updating mouse x/y is delayed but only for plugins.
Is there any reason behind this or am I doing something wrong?
Simple repo plugin
GuiPlugin.rbxm (2.6 KB)
Thanks