Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Does anyone know how to make it so when a player joins something spawns?

Im not sure how to do it correctly!

1 comment

0

You have to be a bit more specific by what you mean spawn, but just use the PlayerAdded function and Clone:() method.

1 answer

You were very vague in your question, but here is an example using the PlayerAdded event of the Players service:

--in a server script
local PartToSpawn = game:GetService("ServerStorage"):WaitForChild("PartToSpawn") or Instance.new("Part")
PartToSpawn.Parent = game:GetService("ServerStorage")

game:GetService("Players").PlayerAdded:Connect(function(player)
	local NewPart = PartToSpawn:Clone()
	NewPart.Parent = workspace
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.