#task.delay isnt accurate ion think
28 messages · Page 1 of 1 (latest)
local function SpawnBuildings()
local CurrentBuildingsFolder = game.ReplicatedStorage:WaitForChild("Scenery"):FindFirstChild(playerUI.Scenery.Scene.Value).Background.Buildings
local BuildingOdds =2
if CurrentBuildingsFolder:FindFirstChild("Building" .. BuildingOdds) then
print("Spawning buildings")
local CurrentBuilding = CurrentBuildingsFolder:FindFirstChild("Building" .. BuildingOdds):Clone()
CurrentBuilding.Name = "Building" .. 2--i
CurrentBuilding.Parent = SceneryFolder:WaitForChild("BuildingsFolder")
CurrentBuilding:SetPrimaryPartCFrame(CFrame.new(BuildingSpawnX,49.4,BuildingSpawnZ))
local BuildingInfo = TweenInfo.new(12, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local BuildingGoals = {CFrame = CFrame.new(BuildingEndX,49.4,BuildingEndZ)}
BuildingTween = TweenService:Create(CurrentBuilding.PrimaryPart,BuildingInfo,BuildingGoals)
BuildingTween:Play()
task.delay(1,function()
if playerUI.GameInSession.Value == true then
SpawnBuildings()
else
end
end)
end
end
the delay may not be constnt because
tbe buildings arent spawning at the same pace
after a while they span inside each other
gradually
@slow prawn
.
]
after u done withthe other guy
wsp
@fast zephyr
@lavish olives
if u feel generous try to help me when u done w the other guy pls
yes
loop
if i put wait
it pauses the whole script
that why i used delay
You want to task.delay 1 after the 12 seconds ?
** You are now Level 23! **
nope
i want the building beside each other
i can give u a screen recording if u want
@sick quail