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

Is there anyway I can make this script make a tool unable to be picked up?

Asked by 7 years ago

This is a script I use for a landmine, but after about a second of deploying it's still able to be picked up.

function drop()
    script.Parent.Parent = game.Workspace
    script.Parent.Handle.CFrame = script.Parent.Handle.CFrame + Vector3.new(0,-1,0)
    local rotation = CFrame.Angles(0,180,-90)
    script.Parent.Handle.CFrame = rotation + script.Parent.Handle.Position
    script.Parent.Handle.Name = ("Explode")
    wait (2)
    script.Parent.Explode.Explode.Disabled = false
end

script.Parent.Activated:connect(drop)

Is there anyway I can edit this script so the landmine can't be picked up?

1 answer

Log in to vote
0
Answered by 7 years ago

Go into the tool and uncheck CanBeDropped.

or use this script

game.StarterPack.ToolName.CanBeDropped = false

Please accept this answer if it worked. :)

0
I would recommend you to just uncheck it's a simple way. TheForgottenTale 23 — 7y
0
I did that before I posted the question :p KatsuneSniper 31 — 7y
Ad

Answer this question