Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can someone help me make a basic respawning script?

Asked by 7 years ago

Hi everyone! Could someone write a script that basically states that upon someone joining a game they are automatically respawned? Thanks!

2 answers

Log in to vote
1
Answered by 7 years ago
1game.Players.PlayerAdded:Connect(function(Player)
2Player:LoadCharacter()
3end)
0
Posted a follow up to this in my reply TerenceWalsh 2 — 7y
Ad
Log in to vote
0
Answered by 7 years ago

@LuaDesign

Basically, I've been trying to develop a system to where we base my teaming system off of specific department or agency groups (I work for a United States group). After placing someone on a team, my script is dependent on the subject being respawned in order to be placed on the correct team. For some reason, I did not incorporate my own respawning system correctly in the script (since I'd like it to occur AFTER team placement).

Could you gander over and see what I did incorrectly?

001local players = game:GetService("Players")
002 
003players.PlayerAdded:Connect(function(player)
004    -- team colors
005    local ManageColor = "Magenta"
006    local CIAColor = "Daisy orange"
007    local FBIColor = "Really blue"
008    local DOSColor = "Mauve"
009    local DODColor = "Bright red"
010    local DOJColor = "Grime"
011    local CONGRESSColor = "Crimson"
012    local CIVColor = "Deep orange"
013    local POTUSColor = "Storm blue"
014    local PRIColor = "Plum"
015    local MEXICANColor = "New Yeller"
View all 107 lines...

Answer this question