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 » Scripters
Home Search
 

Anyone care to try to make this a bit more appealing?:

Previous Thread :: Next Thread 
Pinkerten is not online. Pinkerten
Joined: 03 Aug 2014
Total Posts: 840
10 Feb 2017 11:31 AM
Its a simple part cutting function, I use it with a diffrent function that dictates which side to cut from. If you would like to see that I can show you.
This simpely takes the offset of the mouse on the part, and cuts it according to that.

I can't seam to figure out how to make this less expanded and to condense it more.

--[[In other function
local diff = (part.CFrame:toObjectSpace(CFrame.new(mousepos)))
SplitAxis(part,diff.Y,"Y",grid)
--]]



local function round(x,y)
return ma######################end
local function SplitAxis(part,diff,axis,grid)
if axis == "X" then
local size = part.Size
local split1 = round((size.X/2 - diff),grid)
local split2 = round((size.X/2 + diff),grid)
if split1 >= grid then
local clone = part:Clone()
clone.Size = Vector3.new(split1,size.Y,size.Z)
clone.CFrame = part.CFrame * CFrame.new(split2/2,0,0)
clone.Parent = Enviroment
end
if split2 >= grid then
local clone = part:Clone()
clone.Size = Vector3.new(split2,size.Y,size.Z)
clone.CFrame = part.CFrame * CFrame.new(-split1/2,0,0)
clone.Parent = Enviroment
end
print("X",split1,split2)
elseif axis == "Y" then
local size = part.Size
local split1 = round((size.Y/2 - diff),grid)
local split2 = round((size.Y/2 + diff),grid)
if split1 >= grid then
local clone = part:Clone()
cl########## #e################################# clone.CFrame = part.CFrame * CFrame.new(0,split2/2,0)
clone.Parent = Enviroment
end
if split2 >= grid then
local clone = part:Clone()
cl########## #e################################# clone.CFrame = part.CFrame * CFrame.new(0,-split1/2,0)
clone.Parent = Enviroment
end
print("Y",split1,split2)
elseif axis == "Z" then
local size = part.Size
local split1 = round((size.Z/2 - diff),grid)
local split2 = round((size.Z/2 + diff),grid)
if split1 >= grid then
local clone = part:Clone()
cl########## #e################################# clone.CFrame = part.CFrame * CFrame.new(0,0,split2/2)
clone.Parent = Enviroment
end
if split2 >= grid then
local clone = part:Clone()
cl########## #e################################# clone.CFrame = part.CFrame * CFrame.new(0,0,-split1/2)
clone.Parent = Enviroment
end
print("Z",split1,split2)
end
part:Destroy()
end
Report Abuse
Pinkerten is not online. Pinkerten
Joined: 03 Aug 2014
Total Posts: 840
10 Feb 2017 11:33 AM
Well seams as though roblox's overactive filter wins again, heres a pastebin: wSsjmHq0
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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