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 script Below

Previous Thread :: Next Thread 
Olive1122 is not online. Olive1122
Joined: 11 Feb 2011
Total Posts: 4599
18 Sep 2011 05:24 PM
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
Report Abuse
JonathanSwag is not online. JonathanSwag
Joined: 30 Aug 2011
Total Posts: 1012
18 Sep 2011 05:57 PM
Stop copying scripts
Report Abuse
Olive1122 is not online. Olive1122
Joined: 11 Feb 2011
Total Posts: 4599
18 Sep 2011 05:58 PM
Not copied. I worked hard on this one. I learned how in wiki, Watched a Youtube vid and I know how now :D
Report Abuse
JonathanSwag is not online. JonathanSwag
Joined: 30 Aug 2011
Total Posts: 1012
18 Sep 2011 06:34 PM
No you didn't, I have this plugin already. Stop copying
Report Abuse
squibs47 is not online. squibs47
Joined: 14 Feb 2010
Total Posts: 339
18 Sep 2011 06:50 PM
Lol. Thanksbro. Even though I liek using the command bar =/
Report Abuse
LegoGuyExtreme is not online. LegoGuyExtreme
Joined: 10 Sep 2008
Total Posts: 1267
18 Sep 2011 07:14 PM
It is copied... I already have this plugin.
Report Abuse
Lowcart is not online. Lowcart
Joined: 12 Sep 2011
Total Posts: 1323
18 Sep 2011 07:15 PM
[ Content Deleted ]
Report Abuse
joshrocks101 is not online. joshrocks101
Joined: 07 Jun 2011
Total Posts: 1712
18 Sep 2011 07:20 PM
i kinda belive him cause everytime i make a CFrame script everybody says that i copied but can never give me the original creator so i laugh in there faces and say now do u see dat i didnt copy :P
Report Abuse
Lowcart is not online. Lowcart
Joined: 12 Sep 2011
Total Posts: 1323
18 Sep 2011 07:22 PM
[ Content Deleted ]
Report Abuse
JonathanSwag is not online. JonathanSwag
Joined: 30 Aug 2011
Total Posts: 1012
18 Sep 2011 07:23 PM
It's copied, you can tell.

Also, earlier, this guy copied and script from SH, and posted it again without giving credit
Report Abuse
Olive1122 is not online. Olive1122
Joined: 11 Feb 2011
Total Posts: 4599
19 Sep 2011 07:10 AM
yeah its by cheddly but he helped me make it.
Report Abuse
JonathanSwag is not online. JonathanSwag
Joined: 30 Aug 2011
Total Posts: 1012
19 Sep 2011 04:12 PM
No, stop lieing.
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