|
| 16 Aug 2011 09:45 AM |
If you want to install a Plugin...Follow these istruction exactly...:)
1. Copy this entire script:)
self = PluginManager():CreatePlugin() mouse = self:GetMouse() mouse.Button1Down:connect(function() onClicked(mouse) end) holding = false turbo = false self.Deactivation:connect(function() Off() end) toolbar = self:CreateToolbar("CFrame") toolbarbutton = toolbar:CreateButton("", "CFramer", "CFramer.png") toolbarbutton.Click:connect(function() if on then Off() else On() end end)
local selectionBox local arcHandles local moveHandles local selectedPose local previousCFrame local previousDistance
function onArcHandlesDown(normal) print("handlesDown") if selectedPose then selectedPose.Anchored = true previousCFrame = selectedPose.CFrame end end
function onArcHandlesDrag(axis, relativeAngle, deltaRadius) if selectedPose then local axisangle = Vector3.FromAxis(axis) axisangle = axisangle * relativeAngle selectedPose.CFrame = previousCFrame * CFrame.Angles(axisangle.X, axisangle.Y, axisangle.Z) local x, y, z = selectedPose.CFrame:toEulerAnglesXYZ() print(math.floor(math.deg(x)), math.floor(math.deg(y)), math.floor(math.deg(z))) end end
function onMoveHandlesDown(normal) print("handlesDown") if selectedPose then selectedPose.Anchored = true previousDistance = 0 end end
function onMoveHandlesDrag(normal, distance) if selectedPose then local delta = distance - previousDistance translation = CFrame.new(Vector3.FromNormalId(normal) * delta) selectedPose.CFrame = translation * selectedPose.CFrame previousDistance = distance
print(selectedPose.Position) end end
function On() self:Activate() toolbarbutton:SetActive(true) on = true
selectionBox = Instance.new("SelectionBox") selectionBox.Color = BrickColor.new("Really blue") selectionBox.Adornee = nil selectionBox.Parent = game:GetService("CoreGui") arcHandles = Instance.new("ArcHandles") arcHandles.Color = BrickColor.new("New Yeller") arcHandles.Adornee = nil arcHandles.Axes = Axes.new(Enum.Axis.X, Enum.Axis.Y, Enum.Axis.Z) arcHandles.MouseDrag:connect(onArcHandlesDrag) arcHandles.MouseButton1Down:connect(onArcHandlesDown) arcHandles.Parent = game:GetService("CoreGui")
moveHandles = Instance.new("Handles") moveHandles.Style = Enum.HandlesStyle.Movement moveHandles.Color = BrickColor.new("Really red") moveHandles.Adornee = nil moveHandles.MouseDrag:connect(onMoveHandlesDrag) moveHandles.MouseButton1Down:connect(onMoveHandlesDown) moveHandles.Parent = game:GetService("CoreGui") end
function Off() toolbarbutton:SetActive(false) on = false selectionBox:remove() arcHandles:remove() moveHandles:remove() end
function onClicked(mouse) if on then
if mouse.Target ~= nil then
selectedPose = mouse.Target selectionBox.Adornee = mouse.Target arcHandles.Adornee = mouse.Target moveHandles.Adornee = mouse.Target else selectionBox.Adornee = nil arcHandles.Adornee = nil moveHandles.Adornee = nil end end end
2. Paste the script into (notepad)
3. Save it and name it Cframe.lua
4. Then select the file type as All Files
5. Open up Roblox Studio
6. Then go to Tool>Open Plugins Folder
7. There should be a blank file box that comes up right click and scroll down and click New Folder.
8. Name the folder Plugins
9. Click the new folder twice and drag the Cframe.lua file into the Plugins folder.
10. There should be a blank box under the format box.
11. Click on the blank box and select a part.
12. Congratulations! You have just installed your first roblox Plugin!
|
|
|
| Report Abuse |
|
|
| 16 Aug 2011 09:48 AM |
That looks almost the same as all the other rotate tools in free models. All you did was copy the code and put it into a plugin. And why did you post this twice?
~ Dumbledore ~ |
|
|
| Report Abuse |
|