Morph pad deletes my character when touched

Hello. im having this problem when i touch my morph pad my character’s parts (or body parts) gets removed and i cant respawn. Please help. i used a free model and it only worked ONCED. i dont think this free model is a virus tho. this is the script

local pad = script.Parent
local characterName = "R15"
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
       
        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)
       
        debounce = true
    end
end)

this is an R15 Morph script.

This text will be blurred

there should be something wrong with the model

Free models do not have viruses… They are outdated or some clown filled them with fire effects or they removed things that will reset as soon as you quit the run. Not to hard to look over a script and the model to see if it’s doing dumb things…

To Morph your Character into an NPC you simply Clone() the NPC then change the player Character to it…

newCharacter = wherever the NPC Character is Clone()
player.Character = newCharacter
newCharacter.Parent = workspace

You don’t have enough to work with and test here and that script is a mess… so, here is a fancy version of that with a standing idle… Wolfman.rbxm (76.3 KB)

In this the NPC’s foot is locked (welded) so players can’t knock it over or bump move it. It then deals with the weld when the player changes to it.

Just take a look at the part that is doing the Morph, it’s only a few lines.

2 Likes