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

Why is this CharacterAdded function not working?

I have this LocalScript inside of the StarterGui. It's supposed to put you in a body within the script in Workspace then merge your character with it so that you have control over it. What actually happens is my Player spawns and there's a body behind me with no humanoid (which means my character DID merge with it, but I have two characters...) I don't know what's going on and I'm relatively new to these functions. Output says nothing. Here's the basic code:

if game.Players.LocalPlayer then
	game.Players.LocalPlayer.CharacterAdded:connect(function(a)
			local b=script.Body:clone()
				b.Name=a.Name
				b.Parent=workspace
				b:MakeJoints()
				b:MoveTo(a.Torso.Position)
				a=b
	end)
end

1 answer

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