Sasuto10
|
  |
| Joined: 05 May 2010 |
| Total Posts: 183 |
|
|
| 01 Jun 2012 11:18 AM |
I am trying to make plugin that allows me to use the cframe tool in edit mode, but i keep getting errors. i did try editing it so it would work in edit mode but im not such a scripter. I also ended up getting "CframePlugin.lua:113: 'eof' expected near 'end'" i really dont know what that means and i tried adding )'s and another end. i cant get it to work. This is what i have. an yes the cframe tool isnt mine.
PluginManager() :CreatePlugin() :CreateToolbar("Cframe Toolbar") :CreateButton( "", "Click to Cframe!", "Icon.png" ).Click:connect(function() enabled = true
local selectionBox local arcHandles local moveHandles
local selectedPose local previousCFrame local previousDistance
function onArcHandlesDown(normal) print("handlesDown") if selectedPose then previousCFrame = selectedPose.CFrame moveHandlesPart.Position = selectedPose.Position moveHandlesPart.Size = selectedPose.Size 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))) moveHandlesPart.Position = selectedPose.Position moveHandlesPart.Size = selectedPose.Size end end
function onMoveHandlesDown(normal) print("handlesDown") if selectedPose then previousDistance = 0 moveHandlesPart.Position = selectedPose.Position moveHandlesPart.Size = selectedPose.Size 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)
moveHandlesPart.Position = selectedPose.Position moveHandlesPart.Size = selectedPose.Size end end
function onButton1Down(mouse) print("3DButtonDown") selectionBox.Adornee = nil arcHandles.Adornee = nil moveHandles.Adornee = nil
if mouse.Target ~= nil then selectedPose = mouse.Target selectionBox.Adornee = mouse.Target arcHandles.Adornee = mouse.Target moveHandlesPart.Position = mouse.Target.Position moveHandlesPart.Size = mouse.Target.Size moveHandles.Adornee = moveHandlesPart end end
selectionBox = Instance.new("SelectionBox") selectionBox.Color = BrickColor.new("Cyan") selectionBox.Adornee = nil selectionBox.Parent = game.StarterGui
arcHandlesPart = Instance.new("Part") arcHandlesPart.Name = "ArcHandlesProxyPart" arcHandlesPart.Size = Vector3.new(2,2,2) arcHandlesPart.Parent = game.StarterGui
moveHandlesPart = Instance.new("Part") moveHandlesPart.Name = "MoveHandlesProxyPart" moveHandlesPart.Size = Vector3.new(2,2,2) moveHandlesPart.Parent = game.StarterGui arcHandles = Instance.new("ArcHandles") arcHandles.Color = BrickColor.new("Neon orange") 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.StarterGui
moveHandles = Instance.new("Handles") moveHandles.Style = Enum.HandlesStyle.Movement moveHandles.Color = BrickColor.new("Bright blue") moveHandles.Adornee = nil moveHandles.MouseDrag:connect(onMoveHandlesDrag) moveHandles.MouseButton1Down:connect(onMoveHandlesDown) moveHandles.Parent = game.StarterGui end) end))
im hoping someone can help make the script work. |
|
|
| Report Abuse |
|
|
Sasuto10
|
  |
| Joined: 05 May 2010 |
| Total Posts: 183 |
|
| |
|
|
| 06 Jun 2012 03:51 AM |
BUMP
I want a cframe tool in studio D: |
|
|
| Report Abuse |
|
|
zars15
|
  |
| Joined: 10 Nov 2008 |
| Total Posts: 9999 |
|
|
| 06 Jun 2012 04:25 AM |
USE MINE ONE! >:3 In youtube write "audi80 cframe". He will show how to use it, and install it. |
|
|
| Report Abuse |
|
|
velibor
|
  |
| Joined: 24 Nov 2009 |
| Total Posts: 1003 |
|
|
| 06 Jun 2012 04:43 AM |
Eof excepted near end at line ..
Means : We got a end to much at the Line number that the Output shows
|
|
|
| Report Abuse |
|
|
Sasuto10
|
  |
| Joined: 05 May 2010 |
| Total Posts: 183 |
|
| |
|
kert109
|
  |
| Joined: 31 Dec 2009 |
| Total Posts: 681 |
|
|
| 06 Jun 2012 04:36 PM |
In other wards, to many ends.
~Master Kert, at your service. :3 |
|
|
| Report Abuse |
|
|