I need help with this script, I want it so that the chair spawns non stop, and spawns really fast without the others disappearing....how can I make this block with a script that does just that?
How do I make a block that spawns chairs?
1 answer
PUT THIS SCRIPT INTO THE BLOCK THAT SPAWNS THE CHAIRS, NOTHING ELSE--- Making it Continuously spawn chairs will cause lag but let's do it anyways. This entire script is case sensitive so spell everything right, including caps.
------------------------------------------------------SETUP------------------------------------------------------------------ You will need to make a Folder into the ReplicatedStorage and name it Assets. Take you chair model and put it in the Assets Folder, then name it Chair.
------------------------------------------------------SCRIPT-----------------------------------------------------------------
local chair = game.ReplicatedStorage.Assets.Chair
script.Parent.Touched:connect(function()
while true do
local newChair = chair:Clone()
newChair.Name = "Chair"
newChair.Parent = game.Workspace
newChair:MakeJoints()
newChair:MoveTo(part.Position) -- Change part to the block you want the chairs to spawn at
end
end)
-----------------------------------------------------EXPLANATION---------------------------------------------------------This script is telling the server that when the block is touched to activate the loop. When the loop is activated it creates a clone of the chair then moves it to Workspace, then the block you would like it to "Spawn" on.
------------------------------------------------------WARNING-------------------------------------------------------------- This loop will NEVER END. If you want it to stop you would have to shutdown all servers then rejoin. This loop creates A LOT of lag so be cautious.
If this script doesn't work let me know in the comments of this answer
HAVE FUN
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
While loop just copying a chair over from server storage or something, then using the MoveTo method to move the chair models to the part's location.
Can you explain how that? I need a script to loop it.
Can you post the script?
I'll post a scripted answer.