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

How can I make it so the morph script works for multiple people and not just one?

This is the script I've been using, I've followed every instruction but cant figure out how to give more than one person a different morph using this script.

local Avatar = game:GetService("ReplicatedStorage"):FindFirstChild("Morphs").StarterCharacter

game.Players.PlayerAdded:Connect(function(player)
  if player.UserId == 78162353 then --Using your user Id
    local PlayerAvatar = Avatar:Clone()
    PlayerAvatar.Parent = game:GetService("StarterPlayer")
    PlayerAvatar.Name = "StarterCharacter"
    wait(0.1)
    Player:LoadCharacter()
    end
end)

1 answer

✓ Accepted answer

There is currently an if-then statement in your code that is checking for a UserId. If we delete that then it should work for everyone who joins.

local Avatar = game:GetService("ReplicatedStorage"):FindFirstChild("Morphs").StarterCharacter

game.Players.PlayerAdded:Connect(function(player)
    local PlayerAvatar = Avatar:Clone()
    PlayerAvatar.Parent = game:GetService("StarterPlayer")
    PlayerAvatar.Name = "StarterCharacter"
    wait(0.1)
    Player:LoadCharacter()
end)

1 comment

0

Im sorry, i worded my question in vice verse. Im attempting to make the script assign certain morphs to people whos username i put within the script

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