Put script into Humanoid to avoid the dot operation,
--script is in Humanoid
local Npc = script.Parent.Parent
local Humanoid = script.Parent
Humanoid.Died:Connect(function()
task.wait(1)
Npc:Destroy()
end)
Put script into Humanoid to avoid the dot operation,
--script is in Humanoid
local Npc = script.Parent.Parent
local Humanoid = script.Parent
Humanoid.Died:Connect(function()
task.wait(1)
Npc:Destroy()
end)
Whatās wrong with the last line? itās giving me this
Put
end)
at the last line
still doesnt destroy for some reason
hold on i left the script disabled my bad
Whats up with the task.wait() line?
task wait is the new wait because wait is getting deprecated i think
Iām gonna log into my pc and type out something you can try, Iāll edit this comment in a minute
yeah this still doesnt work even without the disabled script
Can you please show the code your using? Because if your using something else it might not work.
Task.wait() waits until the next heartbeat, or in seconds if you define it with a number.
yeah, you want the noob3 script?
local NPC = workspace.testRig -- (Change "Test" to your NPC name)
local Humanoid = NPC:FindFirstChild("Humanoid")
for _, part in pairs(NPC:GetDescendants()) do
if part:IsA("BasePart") and part:CanSetNetworkOwnership() then
part:SetNetworkOwner(nil)
end
end
task.wait(10)
while true do -- (Change the number to how long you want your npc to stop)
for i=1, 55 do
NPC.Humanoid:MoveTo(workspace["P1_" .. tostring(i)].Position)
NPC.Humanoid.MoveToFinished:Wait()
end
end
I find the highly excessive but, thanks for letting me know
Yes I wanted the noob3 script, since thats the one deleting the model
Everything should like this to delete the character
In this DeleteOnDeath Script should be this
local Humanoid = script.Parent
local Npc = Humanoid.Parent
Humanoid.Died:Connect(function()
wait(1)
Npc:Destroy() print(Npc.Name.." Has Died")
end)
You can even test this with a completely new character if it doesnāt work. Iāve tested this in studio and it works fine
What do you use to make a new character? this doesnt work either
In Plugins"/ Click on and select R6 or R15 and just do Block Rig
Strangeā¦ thats exactly what i doā¦
R15 btw
Well it works fine for me im using R15 too, have you trying making a new character without the extra scripts in it?
Just tried, still nothing
Is it by chance the gun iām using?
Rocket launcher by roblox doesnāt work either??
Maybe, Yes Im using a sword from roblox, does the gun your using acctuly do damage, like
Humanoid:TakeDamage(10)
and not
Humanoid.Health = Humanoid.Health - 10
?