Can we have a group of users that know both roblox and buildism lua...
#1
Transform scripts for people?

Because I have lots of cool scripts that I think would be cool on here
[Image: cxAECR.png]
[Image: r8umfc.gif]
Reply
#2
(06-14-2011, 03:45 AM)McNoobster Wrote: Transform scripts for people?

Because I have lots of cool scripts that I think would be cool on here

Scripter does a good job at transfering, also reading the wiki and finding the functions might help.

Here, give me one and I'll try to change it.
Reply
#3
[[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]
[Image: cxAECR.png]
[Image: r8umfc.gif]
Reply
#4
(06-14-2011, 03:54 AM)McNoobster Wrote: [[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]

Um...

._.
Reply
#5
Too lazy to learn, however, I'll guess I'll look at some scripts.
Reply
#6
The script above would only work for 2D environments.

If you wheel, this would be hard to re-make.
*If you wanted a wheel
Reply
#7
[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.PositionConfusedub(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.
Reply
#8
(06-14-2011, 02:01 PM)Jacob_ Wrote: [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.PositionConfusedub(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.

Thanks
[Image: cxAECR.png]
[Image: r8umfc.gif]
Reply
#9
I'm pretty good at both -- I wrote that wiki article.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)