Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Gui not moving?

Asked by
wackem 50
9 years ago

I can't seem to figure out this problem, and it's really bugging me, the gui will NOT move at all.

01local char = script.Parent
02local gam = char.Parent
03 
04game.Players.PlayerAdded:connect(function(plr)
05    local mouse = plr:GetMouse()
06 
07mouse.Move:connect(function()
08    char.Position = UDim2.new(mouse.X, 0, mouse.Y, 0)
09end)
10end)

1 answer

Log in to vote
0
Answered by
DevArk 50
9 years ago

Make a localscript and put what I wrote for you

1local char = script.Parent
2local gam = char.Parent
3local plr = game.Players.LocalPlayer
4repeat wait() until plr.Character -- waits for the player's character so that no errors occur.
5local mouse = plr:GetMouse()
6 
7mouse.Move:connect(function()
8    char.Position = UDim2(0,mouse.X, 0, mouse.Y)
9end)
0
now it just doesn't show the gui that's supposed to move wackem 50 — 9y
0
Fixed it, you made it set to scale while it should be offset DevArk 50 — 9y
Ad

Answer this question