I think I explained it so it’s understandable. Basically what I want is that when a player joins the game (max players per server will be 1 only), the player’s avatar will be cloned, and the cloned player’s avatar will be put on top of an invisible, uncollided part (name I select to be “AvatarPart”)
I’m a big newbie to scripting and I really fail at trying to do this , I tried searching for something similar but no results. Thanks if anyone can help.
Basically what I mean is after you get player’s avatar, that avatar gets teleported on top of a part which is invisible and uncollided.(so you can’t see it, but can go through it) If it’s impossible to make such a script, it’s fine, I’ll try and find out how to teleport the cloned avatar to specified place.
while #game.Players:GetPlayers() < 1 do wait() end -- wait for the player to exist
local Player = game.Players:GetPlayers()[1]
while not Player.Character do wait() end -- wait for the player's character to exist
local Character = Player.Character
Character.Archivable = true -- letting the Archivable property to false would cause the :Clone() function to return nil
local Clone = Character:Clone() -- so this is the clone.
Clone.Parent = workspace
Clone:MoveTo(workspace.AvatarPart.Position) -- positioning your clone on top of your part
-- make sure you put the correct path to your AvatarPart in the last line.
Here’s an example that should work. (Note that done this way, the clone will not be animated since the Animate script of the clone is a LocalScript, and LocalScripts don’t trigger in the workspace. )