Hello Roblox,
So i mate a code which makes a corpse but i want to make it anchored.
Heres my code:
local cd = game.ReplicatedStorage.ClickDetector
local ps = game.ReplicatedStorage.PromptScript
local pp = game.ReplicatedStorage.ProximityPrompt
local bg = game.ReplicatedStorage.BillboardGui
script.Parent.Archivable = true
local Body = script.Parent:Clone()
Body.Name = script.Parent.Name .. "'s_DeadBody"
while true do
wait(0.1)
if script.Parent.Humanoid.Health == 0 then
if game.ReplicatedStorage.Dead.Value == false then
wait(0.5)
Body.HumanoidRootPart.Position = script.Parent.HumanoidRootPart.Position
Body.HumanoidRootPart.Orientation = script.Parent.HumanoidRootPart.Orientation
--cd:Clone().Parent = Body
--ps:Clone().Parent = Body
pp:Clone().Parent = Body
--bg:Clone().Parent = Body
Body.Parent = game.Workspace
game.ReplicatedStorage.Dead.Value = true
end
end
end
If you are talking about this, then you can use this script:
local cd = game.ReplicatedStorage.ClickDetector
local ps = game.ReplicatedStorage.PromptScript
local pp = game.ReplicatedStorage.ProximityPrompt
local bg = game.ReplicatedStorage.BillboardGui
script.Parent.Archivable = true
local Body = script.Parent:Clone()
Body.Name = script.Parent.Name .. "'s_DeadBody"
Body:FindFirstChild("HumanoidRootPart").Anchored = true
while true do
wait(0.1)
if script.Parent.Humanoid.Health == 0 then
if game.ReplicatedStorage.Dead.Value == false then
wait(0.5)
Body.HumanoidRootPart.Position = script.Parent.HumanoidRootPart.Position
Body.HumanoidRootPart.Orientation = script.Parent.HumanoidRootPart.Orientation
--cd:Clone().Parent = Body
--ps:Clone().Parent = Body
pp:Clone().Parent = Body
--bg:Clone().Parent = Body
Body.Parent = game.Workspace
game.ReplicatedStorage.Dead.Value = true
end
end
end