I'm having trouble making a model re-appear in place of a player morph

  1. What do you want to achieve?
    Hi again! I’m working on this fandom RP game, and one of the admin morphs makes it so the admin takes the place of a model that’s already in the game.

The in-game model, this will be positioned in a specific location:

The model when an admin is morphed into him:
image

  1. What is the issue?
    I managed to make it so when I click a GUI button, it teleports my playermodel (the glowing one) to the original model’s position, then it makes the original transparent. I used okeanskiy’s teleport GUI tutorial as a base. The problems are, when I hit reset, it doesn’t respawn my character until I use the Kohl’s Admin refresh command, and when I DO respawn, the original model stays transparent. I want his transparency to be set to 0 when I’m done playing him so I don’t have to reset the game’s active servers to bring him back.

  2. What solutions have you tried so far?
    I’ve tried using CharacterRemoved. I think that’s the right direction, but I’m super super inexperienced with scripting, so I have no idea where to start and the articles I do find are confusing me. I also tried just making the original non-glowing bits smaller so there wouldn’t be any z-fighting, but when I did this, I wasn’t able to zoom out since my camera was stuck inside the original. My scripts work for the most part, I just need to be able to bring the model back when I’m done.

Okeanskiy's teleport script, modified to fit what I needed

This includes a remote event called Teleport in a RemoteEvent folder in ReplicatedStorage.

This teleports me to the right place so that it looks like the model wakes up or comes to life.

“TeleportServer” script in ServerScriptStorage

-- get the replicatedStorage and the teleport event inside
local replicatedStorage = game:GetService("ReplicatedStorage")
local teleportEvent = replicatedStorage.RemoteEvents.Teleport

-- shortcut to our folder which holds the parts that the player can teleport to
local teleportFolder = workspace.Teleport

-- when the teleportEvent is fired, take the parameters of player (the client that fired)
-- and the partName (the paramter string that was attached, like "Home" or "Town")
teleportEvent.OnServerEvent:Connect(function(player, partName)
	-- get the humanoidRootPart of the player of the client that fired (player paramter)
	local humanoidRootPart = player.Character:FindFirstChild("HumanoidRootPart")
	-- check for part existence
	if humanoidRootPart then
		-- find the part, in the teleportFolder, that has the same name as the string paramter partName, like "Home" or "Town"
		local part = teleportFolder:FindFirstChild(partName)
		-- check for part existence
		if part then
			-- move the CoordinateFrame (position and rotation) of the humanoidRootPart (player) to the part in the teleportFolder (partName)
			humanoidRootPart.CFrame = part.CFrame
		end
	end
end)

“TeleportClient” in StarterGui, under a default text button.

-- shortcut some key instances, the gui and their buttons
local gui = script.Parent
local RMButton = gui["ra moon"]

-- get the replicatedStorage and the teleport event inside
local replicatedStorage = game:GetService("ReplicatedStorage")
local teleportEvent = replicatedStorage.RemoteEvents.Teleport

-- when the home button is clicked, fireServer on teleportEvent with the parameter "Home"
RMButton.MouseButton1Click:Connect(function()
	teleportEvent:FireServer("TP")
end)
The same script, but changed so that the original model disappears on all screens. I don't know if this was the way to do it, but it worked for what I needed.

The remote event here is called KillRaMoon (Ra Moon is the character’s name)

This is what makes the original disappear.

“KillRaMoonServer” in ServerScriptService

	-- get the replicatedStorage and the teleport event inside
local player = game.Players.LocalPlayer
local replicatedStorage = game:GetService("ReplicatedStorage")
local KillRM = replicatedStorage.RemoteEvents.KillRaMoon

-- shortcut to our folder which holds the parts that the player can teleport to
local RaMoon = workspace["Ra Moon offline"]

-- when the teleportEvent is fired, take the parameters of player (the client that fired)
-- and the partName (the paramter string that was attached, like "Home" or "Town")
KillRM.OnServerEvent:Connect(function(player, partName)
	local ramoon = game.Workspace["Ra Moon offline"]
	local descendants = game.Workspace["Ra Moon offline"]:GetDescendants()
	for index, descendant in pairs(descendants) do
		if descendant:IsA("BasePart", "Union") then
			descendant.Transparency = 1
		end
	end
end)

“KillRaMoonClient” in StarterGui

-- shortcut some key instances, the gui and their buttons
local gui = script.Parent
local RMButton = gui["ra moon"]

-- get the replicatedStorage and the teleport event inside
local replicatedStorage = game:GetService("ReplicatedStorage")
local RMkill = replicatedStorage.RemoteEvents.KillRaMoon

-- when the home button is clicked, fireServer on teleportEvent with the parameter "Home"
RMButton.MouseButton1Click:Connect(function()
	RMkill:FireServer("TP")
end)

Thanks for reading all that, and another thanks in advance if you take the time to help me <:]