Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game.Players.PlayerAdded:connect(function(Player)
- wait()
- local character = Player.Character
- --Put model on player
- local model = game.ServerStorage.Dummy:clone()
- model.Parent = character
- model:MoveTo(character.Torso.Position)
- --Debouncer
- local bPos = Instance.new("BodyPosition")
- bPos.Position = Vector3.new(character.Torso.Position.X,character.Torso.Position.Y,character.Torso.Position.Z)
- bPos.Parent = character.Torso
- bPos.P = 0
- bPos.D = 0
- --Make player invisible
- for _,invis in pairs(character:GetChildren()) do
- if invis.ClassName == "Part" then
- invis.Transparency = 1
- end
- if invis.ClassName == "Hat" or invis.ClassName == "Accessory" then
- invis:destroy()
- end
- if invis.Name == "Head" then
- invis:FindFirstChild("face"):destroy()
- end
- end
- --Make welds
- local torsoWeld = Instance.new("Motor6D")
- torsoWeld.Part0 = character.HumanoidRootPart
- torsoWeld.Part1 = model.HumanoidRootPart
- torsoWeld.C0 = CFrame.new(0,0,0)
- torsoWeld.Parent = character.Torso
- --Animation Setup
- local animController = Instance.new("AnimationController")
- local anim = Instance.new("Animator")
- anim.Parent = animController
- animController.Parent = character.Humanoid
- if model.AnimPlay then
- model.AnimPlay.Disabled = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement