So I’ve made a morph script, and there’s another button I’m making which helps transform the player back.
It works, in that the player is made visible again, but the model with the rig inside the player is not desroyed.
(the thing that needs to be deleted is the moddel called Morph)
Anything past line 9 doesn’t work.
I’m still new, so it’s probably a simple error, either way thank you for any help.
(This is just in a localscript in a gui button)
local Player = game.Players.LocalPlayer
local Character = Player.Character
script.Parent.MouseButton1Click:Connect(function()
for _,part in pairs(Player.Character:GetDescendants()) do
if part:IsA('BasePart') or part:IsA('Decal') then
part.Transparency = 0
end
end
Player:FindFirstChild("HumanoidRootPart").Transparency = 1
Player:FindFirstChild("Morph"):Destroy()
Player.CustomAnimate:Destroy()
Player.Animate.Enabled = true
end)