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

How to change the Position of a Label to the Position of the Mouse?

Okay I updated my script:

Player = game.Players.LocalPlayer
Mouse = Player:GetMouse()


Mouse.Move:connect(function()
	if Mouse.Target.Name == "Note1" then
		Player.PlayerGui.ItemPreview.Label.Visible = true
		Player.PlayerGui.ItemPreview.Label.Position = UDim2.new(Mouse.X, Mouse.Y)
		Player.PlayerGui.ItemPreview.Label.Text = "Note"
	else
		Player.PlayerGui.ItemPreview.Label.Visible = false
		Player.PlayerGui.ItemPreview.Label.Text = "N/A"
	end
	
end)

But it position the label with X being the Scale and Y being the Offset of the X Value in the position. And it won't appear on screen.

1 comment

0

mouse.hit.p

1 answer

Try using CloneTrooper's 3d GUI Module. I'm pretty sure it's what you're looking for.

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