local Zombie = game:GetService("Workspace"):WaitForChild("Zombie")
local Key = game:GetService("ServerStorage"):FindFirstChild("Key")
if Zombie:FindFirstChild("Humanoid") then
local Humanoid = Zombie.Humanoid
Humanoid.Died:connect(function()
local keySpawn = Key:Clone()
keySpawn.Parent = game.Workspace
keySpawn.Position = Zombie.HumanoidRootPart.Position
Zombie:Destroy()
end)
end
✓ ANSWER ACCEPTED
For some reason it says "Position is not a member of tool" as the error. Can someone help?
1 answer
✓ Accepted answer
Tool does not have a property named Position. Instead of getting the tool.Position do tool.Handle.Position
local Zombie = game:GetService("Workspace"):WaitForChild("Zombie")
local Key = game:GetService("ServerStorage"):FindFirstChild("Key")
if Zombie:FindFirstChild("Humanoid") then
local Humanoid = Zombie.Humanoid
Humanoid.Died:connect(function()
local keySpawn = Key:Clone()
keySpawn.Parent = game.Workspace
keySpawn.Handle.Position = Zombie.HumanoidRootPart.Position
Zombie:Destroy()
end)
end
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
Key is a Tool, so I'm assuming you can just assign the Handle's Position to that HRP's Position?