How do I make a StarterCharacter that only I spawn as?

Also, do you get any errors? You need to check the output.

okay so I tested it with all the lines of code apart from the makejoints one, my code looks like this and here is a video of my slight success

when I tried with the makejoins line of code it didnt work anymore.

robloxapp-20221223-0937269.wmv (763.2 KB)


local playerId = 1366889120

game.Players.PlayerAdded:Connect(function(player)
	if player.UserId == playerId then
		char.Parent = workspace
		wait(.1)
		player.Character = char
	end
end)

yes, it does
image

also no errors.

Does the makejoints line give you any errors?

Also could you provide me with the whole code?

I just fiddled around with the code a little bit by putting makejoints after its in workspace and it spawns normally, the only problem I have is the animation and the camera but aside from that it works.

Edit: whole code


local playerId = 1366889120

game.Players.PlayerAdded:Connect(function(player)
	if player.UserId == playerId then
		char.Parent = workspace
		char:MakeJoints()
		wait(.1)
		player.Character = char
	end
end)

its the same outcome as the video in this reply

I’ll try to find anything wrong with the code, and post the fixed one here:

Also, have you tried using an event that indicates when you join the server?

I havent, also the fixed code is in the “whole code” reply

Try using this:

event = game.ReplicatedStorage.RemoteEvent
event.OnServerEvent:Connect(function(plr)
	local playerId = 1366889120
	local char = game.ReplicatedStorage.Owner.OwnerCharacter
	
	if plr.UserId == playerId then
		char.Parent = workspace
		char:MakeJoints()
		wait(.1)
		plr.Character = char
	end
	
end)

Edit: Add a remote event in ReplicatedStorage that checks if a player joins the server, and fires it

Edit 2: I made a script(localscript) for the RemoteEvent

local Event = script.Parent
game.Players.PlayerAdded:Connect(function()
Event:FireServer()
end)

in a localscript or in a serverscript?

Edit: Nevermind I see that its a localscript

No, it’s a script.
The script in the remoteevent however, would be a localscript.

I provided you with a script to put in the RemoteEvent that you made in ReplicatedStorage.

If nothing works, I might not be able to help you.

yeah, I tried it and the script isnt recieving it somehow?

I put a print in the normal script and its not printing, no errors.

maybe I should just try reloading studio or something.

well, thanks to ur help, Ive actually gotten somewhere, if u cant fix it thats fine, Ill keep trying different things.

Edit: also the other ppl who helped as well

Try getting the humanoidDescription of the owner’s character humanoid, and then set the humanoidDescription of the character.

local description = game.ServerStorage.Owner.Humanoid:GetAppliedDescription()

game.Players.PlayerAdded:Connect(plr)
      if plr.UserId == 00000 then
          plr.CharacterAdded:Connect(function(char)
                local humanoid = char:WaitForChild(’Humanoid’)
             humanoid:ApplyDescription(description)
           end)
      end
end)

I tried ur code and it gave me an error,

I changed ur code, it now looks like this but it still gives me the error, also Im not sure if using the description of the humanoid would work, since I added cosmetics that are literally just meshparts weldconstrainted together.


game.Players.PlayerAdded:Connect(function(plr)
	if plr.UserId == 1366889120 then
	plr.CharacterAdded:Connect(function(char)
		local humanoid = char:WaitForChild("Humanoid")
		humanoid:ApplyDescription(description)
	end)
end
end)
1 Like

I see, now it’s because that the character added function gets fired before the character is parented to workspace, while humanoidDescription needs to be a parent of a data model, so try using CharacterAppearanceLoaded Instead of characterAdded.

okay, will do but I dont know if itll work or not.

1 Like