How to make a movable frame?

  1. What do you want to achieve? How do you make a movable frame?

  2. What is the issue? I can’t figure it out

  3. What solutions have you tried so far? I searched on YouTube and I still can’t find any solutions

Here’s an example of what I want to make:

Video (I couldn’t upload the video the file size was too big)

1 Like

Hi, here’s my script for a moving frame:

local plr = game.Players.LocalPlayer
local TS = game:GetService("TweenService")
local mouse = plr:GetMouse()

local buttonUp = true --Status of the left mouse button 

mouse.Button1Up:Connect(function()
	buttonUp = true --The function is that if the left mouse button is raised, the status changes
end)

script.Parent.MouseButton1Down:Connect(function(x, y)
	buttonUp = false
	while wait(0.001) do
		TS:Create(script.Parent, TweenInfo.new(0.1), {Position = UDim2.new(0, mouse.X, 0, mouse.Y)}):Play()
		if buttonUp == true then
			break
		end
    end
end)


1 Like

Thanks for the reply! It works perfectly now thank you!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.