I was wondering how I could make my friends spawn on a certain spawn. Here is the script I have tried:
FSpawn = Game.Workspace.FriendSpawn PAdded = game.Players.PlayerAdded PAdded:connect(function(player) if player:IsFriendsWith(13299101) then PAdded.MoveTo.Fspawn end --Here, it says "'=' expected near 'end'" and I don't know what to do. Help?
Please help?
--Now, how can I make the friend be on the friends team?--
The syntax is incorrect. What you need to do is use the CharacterAdded event on the Player from the PlayerAdded, then teleport the player's Character (the in-game model that represents them) to your spawn.
local spawn = Workspace.FriendSpawn game.Players.PlayerAdded:connect(function(player) -- when a player is added, this happens player.CharacterAdded:connect(function(char) -- when the player's character is added, this happens if player:IsFriendsWith(13299101) then -- if the player is friends with you, char:MoveTo(spawn.Position) -- move their character to the position of the Friendspawn end end) end)