I’m trying to make these couches (shown below) spawn in outside of a map, then once spawned in they tween to a new location on the other side of the map, how would I do this?
I know to get my parts randomly spawn I can just do something like the code listed below but I dont want them to spawn in this certain area (red), only the green area
local parts = game.ReplicatedStorage.Items:GetChildren()
while wait() do
local randompart = (parts[math.random(1, #parts)])
local clone = randompart:Clone()
clone.Parent = game.Workspace
clone.Position = Vector3.new(math.random(0, 0), 0, math.random(0, 0))
wait(120)
clone:Destroy() -
wait(5)
end
Yet this script above will not work exactly on how I like, because it will spawn in the whole area, including the red area I don’t want them to spawn in, also with they would only spawn in one at a time when I want multiple (maybe 5-8) chairs coming at the player at once So how would I make them spawn in properly?
Once they spawn in on one of the green sides, I want them to then tween to the other side, as the player will be in the red area trying to dodge the chairs coming out from the walls, where I don’t even know where to start with that. (ps. chairs are a union, not sure if that changes anything)
Asking for a lot, but I’m really lost on where to start and how to make it work properly.
(gif shown below of what i’m going for, but obviously i couldnt make the chairs move at the same time on both sides)