Ad
Log in to vote
0

Frame is not positioned in the mouse's Position?

Asked by 8 days ago
Edited 8 days ago

This is something really hard to do. It doesn't make the frame not positioned correctly. Video: https://gyazo.com/13b3d5c0b0f41cf25fd43f17a2f210a2 I've tried looking for posts dev forum, nothing just works. Example of what I tried to do reading dev forum posts: Convert Vector2 to UDim2 Code:

local mouse = game.Players.LocalPlayer:GetMouse()

script.Parent.MouseButton1Click:Connect(function()
    local connection
    local isActive = true
    local box = Instance.new("Frame")
    box.Size = UDim2.fromOffset(75, 75)
    box.BackgroundColor3 = Color3.new(0.407843, 1, 0.341176)
    local vector2 = game:GetService("UserInputService"):GetMouseLocation()
    box.Position = UDim2.fromOffset(vector2.X, vector2.Y)
    box.Parent = script.Parent
    connection = mouse.Move:Connect(function()
        local vector2A = game:GetService("UserInputService"):GetMouseLocation()
        box.Position = UDim2.fromOffset(vector2A.X, vector2A.Y)
    end)
    mouse.Button1Up:Once(function()
        connection:Disconnect()
        local unselectedBox = box:Clone()
        unselectedBox.Size = UDim2.fromOffset(75, 75)
        unselectedBox.BackgroundColor3 = Color3.new(0.0745098, 0.631373, 1)
        unselectedBox.Parent = script.Parent.Parent
        box:Destroy()
        isActive = false
    end)
end)

Any help?

Extra:

I changed mouse.Icon

0
Try setting IgnoreGuiInset to true and make sure the frame size is EXACTLY 1,0,1,0 T3_MasterGamer 458 — 7d
0
im smart enough to know thatttttt ryanzhzh 56 — 7d

Answer this question