-- Written by RubenKan, edited by Scooterdip
local player = game.Players.LocalPlayer
local m = player:GetMouse()
m.Button1Down:connect(function()
buttonUp = false
if m.Target then
if m.Target:FindFirstChild("AllowDrag") then
if m.Target.AllowDrag.Value == true then
local Job = player:FindFirstChild("Job")
if Job then
if Job.Value == "Baker" then
if m.Target.Name == "Cake" then
local Part = m.Target
m.TargetFilter = Part
repeat
Part.Rotation = Vector3.new(-0, 0, 90)
Part.CFrame = CFrame.new(m.Hit.p)
wait()
until buttonUp
end
end
end
end
end
end
end)
m.Button1Up:connect(function()
buttonUp = true
m.TargetFilter = nil
end)
Hey. This script is put in the StarterPlayer scripts, and it makes certain parts draggable. I was wondering if there was a way to keep the Rotation at a certain angle, because
Part.Rotation = Vector3.new(-0, 0, 90)
doesn't do it. Thanks in advance.

1 comment
Part.CFrame = CFrame.new(m.Hit.p) * CFrame.Angles(x, y, z) ---do something like that