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

How can I make a script so my friends can spawn?

How can I make a spawn that makes ONLY my friends spawn on a spawn? Here's a script I tried but I don't know what to do:

FSpawn = Game.Workspace.FriendSpawn
PAdded = game.Players.PlayerAdded

PAdded:connect(function(player)
	if player:IsFriendsWith(13299101) then
		PAdded.MoveTo.Fspawn
	end --On this line, it says" '=' expected near 'end'"

2 answers

We will not supply you with the full script but we can give you methods of doing it:

Add each of your friends' names to a table. Using the PlayerAdded event, check if the new player's name is in the table, if so attach the CharacterAdded event and move their character to the spawn position.

2 comments

0

Just one problem, I have a lot of friends and I want all my friends to spawn at that spawn.

0

That's fine, just keep adding values to the table, you can have virtually as many as you want.

I agree with Ninjo and cnt, you can't just ask for a script.

About the friends method cntkillme told you about, if you're good enough at scripting, Player Object from Players Service, has a method called player:IsFriendsWith(userId), That way, you can figure out how to do it, you could insert the player userId in the Allowed list table with .PlayerAdded Event, just remember, we help but we don't give out scripts.

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