Hi i want to make a crosshair that moves with the mouse but i didn't worked :/ Also no error in the output
Script:
local plr = game.Players.LocalPlayer local mouse = plr:getMouse() mouse.Move:Connect(function() plr.PlayerGui.Gui.crossHair.Position = UDim2.new(mouse.Hit.x,mouse.Hit.y) end)
To get the position of mouse on screen, you use mouse.X or mouse.Y so your line 4 will look like this:
plr.PlayerGui.Gui.crossHair.Position = UDim2.new(0,mouse.X,0,mouse.Y)
You don't need Any script for that. Just go to the frame's properties and make sure the active button is checked out. Next, you should see a button that says draggable. Check that out and there you go, if you did it correctly, it Should work.