I can't seem to figure out this problem, and it's really bugging me, the gui will NOT move at all.
01 | local char = script.Parent |
02 | local gam = char.Parent |
03 |
04 | game.Players.PlayerAdded:connect( function (plr) |
05 | local mouse = plr:GetMouse() |
06 |
07 | mouse.Move:connect( function () |
08 | char.Position = UDim 2. new(mouse.X, 0 , mouse.Y, 0 ) |
09 | end ) |
10 | end ) |
Make a localscript and put what I wrote for you
1 | local char = script.Parent |
2 | local gam = char.Parent |
3 | local plr = game.Players.LocalPlayer |
4 | repeat wait() until plr.Character -- waits for the player's character so that no errors occur. |
5 | local mouse = plr:GetMouse() |
6 |
7 | mouse.Move:connect( function () |
8 | char.Position = UDim 2 ( 0 ,mouse.X, 0 , mouse.Y) |
9 | end ) |