What I'm trying to do. I am trying to make it so that once a part is generated for my game the next one generates from the new position got from the previous generate. The problem is it only generates in front of the original block that the script executes from. (All of the blocks in the serverstorage are the same size)
Make a block then do everything below.
Block Size You must use this to test the script(12, 4.22, 24.43) Block Position This too. (-7.768, 2.11, 5.689)
Next you duplicate the block at the same position and put it in serverstorage and keep duplicating and type all the names below in all the blocks you duplicated then in the original block (not the ones in the serverstorage) is still suppose to be in workspace. and after that put this script into the original block.
hope i explained this right.
local OldPart_CFrame = 0
while wait(2) do
local Choose = math.random(1,8)
if Choose == 1 then
local Generate = game.ServerStorage.Default:Clone()
Generate.Parent = workspace
OldPart_CFrame = Generate.Position.Z -- Z Axis
Generate.CFrame = Generate.CFrame * CFrame.new(0, 0, 19.2 + math.pi+2)
end
if Choose == 2 then
local Generate = game.ServerStorage.Jumps:Clone()
Generate.Parent = workspace
OldPart_CFrame = Generate.Position.Z -- Z Axis
Generate.CFrame = Generate.CFrame * CFrame.new(0, 0, 19.2 + math.pi+2)
end
if Choose == 3 then
local Generate = game.ServerStorage.Middle:Clone()
Generate.Parent = workspace
OldPart_CFrame = Generate.Position.Z -- Z Axis
Generate.CFrame = Generate.CFrame * CFrame.new(0, 0, 19.2 + math.pi+2)
end
if Choose == 4 then
local Generate = game.ServerStorage.NoMiddle:Clone()
Generate.Parent = workspace
OldPart_CFrame = Generate.Position.Z -- Z Axis
Generate.CFrame = Generate.CFrame * CFrame.new(0, 0, 19.2 + math.pi+2)
end
if Choose == 5 then
local Generate = game.ServerStorage.SideLeft:Clone()
Generate.Parent = workspace
OldPart_CFrame = Generate.Position.Z -- Z Axis
Generate.CFrame = Generate.CFrame * CFrame.new(0, 0, 19.2 + math.pi+2)
end
if Choose == 6 then
local Generate = game.ServerStorage.SideRight:Clone()
Generate.Parent = workspace
OldPart_CFrame = Generate.Position.Z -- Z Axis
Generate.CFrame = Generate.CFrame * CFrame.new(0, 0, 19.2 + math.pi+2)
end
if Choose == 7 then
local Generate = game.ServerStorage.Slide:Clone()
Generate.Parent = workspace
OldPart_CFrame = Generate.Position.Z -- Z Axis
Generate.CFrame = Generate.CFrame * CFrame.new(0, 0, 19.2 + math.pi+2)
end
if Choose == 7 then
local Generate = game.ServerStorage.TopJumps:Clone()
Generate.Parent = workspace
OldPart_CFrame = Generate.Position.Z -- Z Axis
Generate.CFrame = Generate.CFrame * CFrame.new(0, 0, 19.2 + math.pi+2)
end
end

1 comment
No idea what you're trying to do.