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

How to make a script that Player with Roblox username will spawn as custom character when joined?

Asked by 5 years ago
Edited 5 years ago

How to make a script that when a player named for example "Jeff123" will join my place he/she will spawn as R6 custom character that have humanoid in?

I've put this script in ServerScriptService:

local Replicated = game:GetService("ReplicatedStorage")

game.Players.PlayerAdded:Connect(function(plr)
   local char = plr.Character or plr.CharacterAdded:Wait()

   if plr.Name == "Jeff123" then
      local Char1 = Replicated.Character1:Clone()
      Char1.Parent = game.StarterPlayer
      Char1.Name = "StarterCharacter"
      local Humanoid = Instance.new("Humanoid")
      Humanoid.Name = "StarterHumanoid"
      Humanoid.Parent = game.StarterPlayer
      char:LoadCharacter()
   end
end)

And then i put the custom character named "Character1" in ReplicatedStorage

But when i renamed "Jeff123" to my Roblox username to test if it works, it didn't work and there were no errors in Developer Console :(

0
I don't know what you're trying to do, but if you want a customizable character that uses R6, Roblox already has an option in "Game Settings" (in Roblox Studio) where you can set so that players may only spawn in ar R6. You could then use a script to add/remove things from their character. Loughdough 291 — 5y

Answer this question