Advertisement
Navarone19_CH

MorphServer

Jul 27th, 2020
5,028
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. local pad = script.Parent
  2. local characterName = "MookGingKo"
  3. local character = pad.Parent:WaitForChild(characterName)
  4.  
  5. local debounce = true
  6. pad.Touched:Connect(function(obj)
  7. local plr = game.Players:GetPlayerFromCharacter(obj.Parent)
  8. if plr and debounce == true then
  9. debounce = false
  10.  
  11. pad.BrickColor = BrickColor.new("Really red")
  12.  
  13. local charClone = character:Clone()
  14. charClone.Name = plr.Name
  15. plr.Character = charClone
  16.  
  17. local rootPart = charClone:FindFirstChild("HumanoidRootPart") or charClone:FindFirstChild("Torso")
  18. local plrRoot = obj.Parent:FindFirstChild("HumanoidRootPart") or obj.Parent:FindFirstChild("Torso")
  19.  
  20. if rootPart and plrRoot then
  21. rootPart.CFrame = plrRoot.CFrame
  22. end
  23.  
  24. charClone.Parent = workspace
  25.  
  26. wait(1)
  27.  
  28. pad.BrickColor = BrickColor.new("Lime green")
  29. debounce = true
  30. end
  31. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement