Created
August 15, 2021 12:59
-
-
Save EpicBoyX/3d0b148e0d4788ddd3ce350746728ef3 to your computer and use it in GitHub Desktop.
roblox morph script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local pad = script.Parent | |
local characterName = "Insert Character Model Name Here" | |
local character = pad.Parent:WaitForChild(characterName) | |
local debounce = true | |
pad.Touched:Connect(function(obj) | |
local plr = game.Players:GetPlayerFromCharacter(obj.Parent) | |
if plr and debounce == true then | |
debounce = false | |
pad.BrickColor = BrickColor.new("Really red") | |
local charClone = character:Clone() | |
charClone.Name = plr.Name | |
plr.Character = charClone | |
local rootPart = charClone:FindFirstChild("HumanoidRootPart") or charClone:FindFirstChild("Torso") | |
local plrRoot = obj.Parent:FindFirstChild("HumanoidRootPart") or obj.Parent:FindFirstChild("Torso") | |
if rootPart and plrRoot then | |
rootPart.CFrame = plrRoot.CFrame | |
end | |
charClone.Parent = workspace | |
wait(.5) | |
pad.BrickColor = BrickColor.new("Lime green") | |
debounce = true | |
end | |
end) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment