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

Best way to clone a package to the player?

I'm trying to get a package I placed in ServerStorage to clone to the Player's character model. I tried using :Clone(), but that doesn't seem to work.

--Setup--
wait()

local MrGrey = game.ServerStorage.MrGrey
------------------------------------------
game.Players.PlayerAdded:connect(function(ChangeAppear)
	game.ServerStorage.MrGrey:Clone().Parent = game.Players.LocalPlayer.Character
end)

2 comments

0

Is this a Script in either the Workspace or ServerScriptService? (If not, it needs to be.) Also, if you're going to have line 4, you might as well use that variable on line 7 ["MrGrey:Clone()" instead of "game.ServerStorage.MrGrey:Clone()"] (this won't fix your problem, however)

0

No.

2 answers

Try putting the model in ReplicatedStorage; if that does not work, then put it in Lighting.

So what I would do is this:

 -- No wait cause that actually pauses your script
local MrGrey = game.ServerStorage.MrGrey:clone()

game.Players.PlayerAdded:connect(function(player) -- The function PlayerAdded
	player.CharacterAdded:connect(function(char) -- The function CharacterAdded
		MrGrey.Parent = char -- Making the parent the character
	end) -- Ends char function
end) -- Ends player function

Please accept if this works. Thank you!

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