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

MouseDrag in Handles won't fire, help?

Asked by 8 years ago

MouseDragin Handles won't fire, Handles being inside a Script inside a ScreenGui, Adornee'd on Part inside workspace.CurrentCamera

local handle = Instance.new("Handles", mainGui)
handle.Style = "Resize"
handle.Adornee = selectionPart
handle.Color3 = Color3.new(1, 170/255, 0)
handle.Transparency = 0.5
handle.Faces = selectionPart.ResizeableFaces
handle.MouseDrag:connect(function(face, amount)
    print("Drag")
    selectionPart:Resize(face, amount)
end)

The handle is created, but the event doesn't works.

1 answer

Log in to vote
1
Answered by
ImageLabel 1541 Moderation Voter
8 years ago

The Handles object must be placed in the local player's PlayerGui or the CoreGui service to work as expected. (via wiki)

Ad

Answer this question