How Do I change The startercharacter With A script? Is There Something I'm Doing Wrong Or A more effective Way? Im fairly new to scripting;

local DB = false
local function leftClick()
	if DB == true then return end
	DB = true
	local found = game.StarterPlayer:FindFirstChild("StarterCharacter1")
	if found then 
		game.StarterPlayer.StarterCharacter1.Name =("StarterCharacter")
		print("kiwi")
	else
		print ("uwu")
		local CMC = game.Workspace.Classes.CatMaid:Clone()
		CMC.Parent = game.StarterPlayer
		CMC.Name = "StarterCharacter"
	end
end

local function ResetDB()
	DB = false
end

script.Parent.MouseButton1Click:Connect(leftClick)

dont mind the uwu and kiwi lol No error.

2 comments

0

I believe you cant change the StarterCharacter while the player is alive.

0

Oh, thanks. I'll try that.