I want to make like a spectating system and I want the player's body to stay where they died so they can spectate and their body will stay.
I tried getting their character position when they're dead, Cloning the character and doing if their character position is not the position that they were dead it makes the clone appear and that didn't work.
I would really appreciate it if you help me and tell me the script for it or minimum the method of doing that.
Thanks, MajinBluee
local Character= game.Players.LocalPlayer.Character local humanoid = character:WaitForChild("Humanoid") local clone = character:Clone() ------------------------------------------------------------------------------- local torsoPos = nil function ANCHOR(character, state) if character ~= nil then for _, v in pairs(character:GetChildren()) do if v:IsA("BasePart") then v.Anchored = true end end end end humanoid.Died:connect(function() --anchor character-- ANCHOR(Character, true) --prevent character from flinging --get torso cframe-- if Character:FindFirstChild("Torso") then torsoPos = Character.Torso.CFrame end ANCHOR(Character, false) --create posPart-- local posPart = Instance.new("Part") posPart.Anchored = true posPart.Size = Vector3.new(.2, .2, .2) posPart.CFrame = torsoPos --set clone's position-- if clone ~= nil and clone:FindFirstChild("Torso") then ANCHOR(clone, true) clone.Parent = workspace clone:FindFirstChild("Torso").CFrame = posPart.CFrame wait(.1) ANCHOR(clone, false) end end)