generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Cframe Tool Plugin

Previous Thread :: Next Thread 
Sasuto10 is not online. 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 is not online. Sasuto10
Joined: 05 May 2010
Total Posts: 183
01 Jun 2012 06:05 PM
...
Report Abuse
alexangulo is not online. alexangulo
Joined: 24 Oct 2009
Total Posts: 9286
06 Jun 2012 03:51 AM
BUMP

I want a cframe tool in studio D:
Report Abuse
zars15 is not online. 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 is not online. 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 is not online. Sasuto10
Joined: 05 May 2010
Total Posts: 183
06 Jun 2012 04:30 PM
that didnt make since
Report Abuse
kert109 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image