Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- args = {...}
- if args[2] == "name" then
- id = game:GetService("Players"):GetUserIdFromNameAsync(args[1])
- else
- id = args[1]
- end
- local oldModel = owner.Character
- local newModel = game.Players:CreateHumanoidModelFromUserId(id)
- local oldCFrame = oldModel:GetPrimaryPartCFrame()
- owner.Character = newModel
- newModel.Parent = workspace -- [1] this follows current character loading behavior
- newModel:SetPrimaryPartCFrame(oldCFrame)
- oldModel:Destroy()
- --char = game.Players:CreateHumanoidModelFromUserId(id)
- --char.Parent = workspace
- --owner.Character = char
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement