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

script works until Buzz:Destroy() where it doesn't destroy the bodyposition, any reason why?

Asked by 5 years ago
function onTouched(hit)
    human = hit.Parent:FindFirstChild("Humanoid") -- returns "Humanoid" if exists, else returns nil
    if human ~= nil then
        human.Health = human.Health -25
        local Buzz = Instance.new("BodyPosition")
        Buzz.Parent = human.Parent.Torso
        Buzz.D = 1250
        Buzz.MaxForce = Vector3.new (0,8999999488,0)
        Buzz.P = 10000
        Buzz.Position = Vector3.new (-92,200,10)
        wait(1.5)
        human.PlatformStand = true
        Buzz:Destroy()
        wait(2)
        human.PlatformStand = false
    end
    --Enter code here
end
script.Parent.Touched:connect(onTouched)
0
Is this a local script or a script? BetterNotDie 11 — 5y
0
Same here. BetterNotDie 11 — 5y
0
Connect not connect. Also you should assign Parent as the last property. Also, you don't need the ~= nil User#19524 175 — 5y

Answer this question