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

How would I change this gui's position based on the mouse's position? [closed]

Asked by 9 years ago

There is an error in this script. This gui should move to the Mouse's X position. I'm using scale, It could also be offset through. Please help!

local mouse = game.Players.LocalPlayer:GetMouse()
while wait() do
    script.Parent.Position.X.Scale = mouse.X --The error is on line 3.
end

There is no output.

FIXED.

Here is the fixed script. I fixed it myself.

local mouse = game.Players.LocalPlayer:GetMouse()
while wait() do
    script.Parent.Position = UDim2.new(0, mouse.X,0.65, 0)
end

Locked by EzraNehemiah_TF2 and BlueTaslem

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?