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

Can someone help me with this gui which is supposed to follow the mouse?

Asked by 5 years ago
local gui = plr:WaitForChild("PlayerGui"):WaitForChild("Mouse")
    while true do
        wait(0.5)

        if mouse.Target and mouse.Target.Parent:FindFirstChild("Collect") then
            -- Can i collect this
        gui.TextLabel.Visible = true
        gui.TextLabel.Text = mouse.Target.Parent.Name
        gui.TextLabel.Position = UDim2.new(mouse.X,0,mouse.Y,0)
        else
        gui.TextLabel.Visible = false   
        end     
    end
0
Any errors? User#19524 175 — 5y
0
sadly no mattchew1010 396 — 5y
2
@OP try this: UDim2.new(0, mouse.X, 0, mouse.Y) User#19524 175 — 5y
0
thanks that worked mattchew1010 396 — 5y
View all comments (2 more)
0
just forgot there are 3 axis i assume? XD skillfulzombie88 28 — 5y
0
No, UDim2 uses 4 values. ^ ArtFoundation 255 — 5y

Answer this question