Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

NPC script works in test mode but not the real game? [closed]

Asked by 7 years ago

I have a script inside an NPC zombie where limbs will de-attach when shot, but it doesn't work in the actual game. I tried local script, WaitForChild variables, but nothing. No output errors are in either test mode or the real game. What's going on here?

001local NPC = script.Parent
002local Humanoid = script.Parent.Humanoid
003local HumanoidClone = script:WaitForChild("HClone")
004local Weld = script:WaitForChild("Welding")
005local ready = true
006 
007local function Deattach(upper,lower,extremity)
008    local hc = HumanoidClone:Clone()
009if upper ~= nil then
010    local c1 = upper:Clone()
011    c1.CanCollide = true c1.CFrame = upper.CFrame
012        upper:remove()
013for i,v in pairs(c1:GetChildren()) do
014    v:remove()
015end
View all 100 lines...
0
Bruh just breakjoints() if it's a limb.. too much code for anyone to sort through. Goulstem 8144 — 7y

Closed as Too Broad by Goulstem

This question has been closed because it is too broad and is generally unanswerable. Please ask a more specific question.

Why was this question closed?