Like, I want to create a very cool effect that creates parts that form a sphere. I saw a tutorial, did everything right, but it just happens all at once. If you need the tutorial, I can give you the video link
Perhaps you did something wrong during the tutorial.
From what I understand, you did some kind of loop to generate the parts, and from what you said "it happens all at once " I assume you didn’t use wait()
in the loop. If that wasn’t the case could you please show me the tutorial you were talking about and also show me your script.
Okay, sure. Im testing another thing right now, I will give you the script later.
local folder = script.Folder
local cf = script.Parent.CFrame
local Z = 12
for i = 1,30,1 do
script.Parent.CFrame = cf*CFrame.Angles(0,0,math.rad(Z)
for a = 1,30,1 do
local clone = script.Parent:Clone()
clone.Script:Destroy()
clone.Parent = folder
script.Parent.CFrame = script.Parent.CFrame*CFrame.Angles(0,math.rad(360/30),0)
clone.CFrame = script.Parent.CFrame*CFrame.new(0,0,-15)
end
Z = Z + 360/30
task.wait(0.1)
end
some lines of the code were deleted because i dont need them right now
Almost identical result, but I want the same effect as on the tutorial.
Can somebody help me please??
Try this:
local folder = script.Folder
local cf = script.Parent.CFrame
local Z = 12
for i = 1,30,1 do
script.Parent.CFrame = cf*CFrame.Angles(0,0,math.rad(Z)
for a = 1,30,1 do
local clone = script.Parent:Clone()
clone.Script:Destroy()
clone.Parent = folder
script.Parent.CFrame = script.Parent.CFrame*CFrame.Angles(0,math.rad(360/30),0)
clone.CFrame = script.Parent.CFrame*CFrame.new(0,0,-15)
task.wait(1) -- I added a second wait here
end
Z = Z + 360/30
task.wait(1)
end
Ok, now its better. I will ask the video creator how he did that.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.