06-14-2011, 03:45 AM
Transform scripts for people?
Because I have lots of cool scripts that I think would be cool on here
Because I have lots of cool scripts that I think would be cool on here
Can we have a group of users that know both roblox and buildism lua...
|
06-14-2011, 03:45 AM
Transform scripts for people?
Because I have lots of cool scripts that I think would be cool on here
06-14-2011, 03:47 AM
06-14-2011, 03:54 AM
[[lua]
--[[----Circle script, by xLEGOx--------- INSTRUCTIONS: set "rad" to the distance between the center of the cicle and the outer edge set "reps" to the ammount of bricks in the circle press the "play" button and your circle will be created, yays =P ]] local bin = script.Parent local orig = bin.Position script.Parent = game.Workspace local m = Instance.new("Model") m.Parent = game.Workspace ----Set these---- local rad = 30 local reps = 30 -------------------- for i = 0, math.pi*2, math.pi*2/reps do local a = bin:clone() a.Position = orig+Vector3.new(rad*math.sin(i), 0, rad*math.cos(i)) a.CFrame = CFrame.new(a.Position, orig) a.Anchored = true a.Parent = m end print("done") [/lua]
06-14-2011, 05:09 AM
(06-14-2011, 03:54 AM)McNoobster Wrote: [[lua] Um... ._.
06-14-2011, 05:25 AM
(This post was last modified: 06-14-2011, 05:25 AM by Megabrawler.)
06-14-2011, 10:24 AM
(This post was last modified: 06-14-2011, 10:24 AM by 2Drobloxrocker64.)
The script above would only work for 2D environments.
If you wheel, this would be hard to re-make. *If you wanted a wheel
06-14-2011, 02:01 PM
[lua]
local part = script.Parent local orig = part.Position script.Parent = game.World local m = create("Model") m.Parent = game.World local rad = 30 local reps = 30 for i = 0, math.pi*2, math.pi*2/reps do local a = part:clone() a.Position = orig:add(Vec2D(rad*math.sin(i), rad*math.cos(i))) v = a.Positionub(orig).normalized a.Rotation = math.deg(math.atan2(v.y, v.x)) a.Fixed = true a.Parent = m end [/lua] Put the script in a part, and it will make a hollow circle around it out of that part. Works with boxes and circles.
06-14-2011, 02:35 PM
(06-14-2011, 02:01 PM)Jacob_ Wrote: [lua] Thanks
06-14-2011, 04:05 PM
I'm pretty good at both -- I wrote that wiki article.
|
« Next Oldest | Next Newest »
|