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

How can you clamp a guis position when its dragable?

Asked by
hokyboy 270 Moderation Voter
3 years ago
frame = script.Parent
frame.Draggable = true
frame.Active = true
frame.Selectable = true

math.clamp(UDim2.new(-2), UDim2.new(-2))
math.clamp(UDim2.new(0), UDim2.new(-2))
0
Draggable isn't a property of a frame, is it? radiant_Light203 1166 — 3y

1 answer

Log in to vote
1
Answered by 3 years ago
Edited 3 years ago

Garbage question.

while true do
    wait()
    Frame.Position = Udim2.new(
        math.clamp(Frame.Position.X, MIN, MAX)
        0,
        math.clamp(Frame.Position.Y, MIN2, MAX2)
        0,
    )
end
Ad

Answer this question