Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Gui not moving?

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

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)

2 comments

0

now it just doesn't show the gui that's supposed to move

0

Fixed it, you made it set to scale while it should be offset

This discussion is preserved as it was. New answers, comments, and votes are closed.