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
8 years ago

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

local char = script.Parent
local gam = char.Parent

game.Players.PlayerAdded:connect(function(plr)
    local mouse = plr:GetMouse()

mouse.Move:connect(function()
    char.Position = UDim2.new(mouse.X, 0, mouse.Y, 0)
end)
end)

1 answer

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

Make a localscript and put what I wrote for you

local char = script.Parent
local gam = char.Parent
local plr = game.Players.LocalPlayer 
repeat wait() until plr.Character -- waits for the player's character so that no errors occur.
local mouse = plr:GetMouse()

mouse.Move:connect(function()
    char.Position = UDim2(0,mouse.X, 0, mouse.Y)
end)
0
now it just doesn't show the gui that's supposed to move wackem 50 — 8y
0
Fixed it, you made it set to scale while it should be offset DevArk 50 — 8y
Ad

Answer this question