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

StarterCharacter for a specific user?

So I have a question, I am trying to make a StarterCharacter that only I can have in my game that I'm working on, I have gotten it to work using this code below, but the problem is that when anyone in my game resets, they will respawn as my character model as well, is there anyway around this? and if so can they help me by sharing the code as I am really new to this. Thank you! Here is my code in ServerScriptService at the moment:

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

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

2 comments

0

Yes it does have a JoJo character but its only to test the script and I used him because I am a fan

0

btw remember to put your code in a codeblock

1 answer

just do it in a local script

so in StarterPlayerScripts, put this:

local Avatar = game:GetService("ReplicatedStorage"):WaitForChild("Jotaro"):WaitForChild("StarterCharacter")
local plr = game:GetService("Players").LocalPlayer

if plr.UserId == 339048720 then
	local clone = Avatar:Clone()
	clone.Parent = game:GetService("StarterPlayer")
	task.wait(0.03)
	plr:LoadCharacter()
end

1 comment

0

When I do this nothing happens, I just spawn in as my regular self still

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