Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script.Parent.ProximityPrompt.Triggered:Connect(function(player)
- script.Parent.PortalEnter:Play()
- local Search = player.PlayerGui:GetChildren()
- script.Parent.MorphModel.ImportantResources.HumanoidPos.CFrame = player.Character.HumanoidRootPart.CFrame
- local ModelClone = script.Parent.MorphModel.CharacterModel:Clone()
- local Camera = workspace.CurrentCamera
- local ModelChildren = ModelClone:GetChildren()
- ModelClone.Parent = player.Character
- local PlayerChildren = player.Character:GetChildren()
- print(player)
- print(player.Character)
- for i, v in pairs(PlayerChildren) do
- if v.Name ~= 'CharacterModel' then
- v:Destroy()
- end
- end
- local PFinder = player.PlayerGui:GetChildren()
- print(PFinder)
- for i, v in pairs(ModelChildren) do
- print(v)
- v.Parent = v.Parent.Parent
- if v.Name == 'HumanoidRootPart' then
- v.Anchored = false
- v.CFrame = script.Parent.MorphModel.ImportantResources.HumanoidPos.CFrame
- end
- end
- for i, v in pairs(PFinder) do
- if v.Name == 'NumberSet' then
- v:Destroy()
- end
- end
- script.Parent.MorphModel.ImportantResources.Animate:Clone().Parent = player.Character
- script.Parent.MorphModel.ImportantResources.PlayAudio:Clone().Parent = player.Character
- player.Character.CharacterModel:Destroy()
- game.ReplicatedStorage.CameraEvent:FireClient(player)
- script.Parent.MorphModel.ImportantResources.NumberSet:Clone().Parent = player.PlayerGui
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement