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

How to make a script within a tool delete an equipped tool from player model?

Asked by 8 years ago

Title says it all. Help? I tried a simple script.Parent:Destroy() but that did not work.

0
There could be multiple times when you want the tool deleted, what's yours'? When the player equips the tool? After a round is over? PreciseLogic 271 — 8y

1 answer

Log in to vote
0
Answered by
itsJooJoo 195
8 years ago

Put a ServerScript inside the tool. Put these lines inside it:

--Enter previous lines of code here
function blarb() --You can call this function whatever you want :P
    script.Parent:Destroy()
end

script.Parent.Equipped:connect(blarb) --Change blarb to the name of function

Sorry if this is wrong. Again, it depends on the script and when it'll run, etc. Hopefully it works :3

0
Sorry for the lack of elaboration. I want the script to delete the tool after some lines of code within the script run. The script will run when the tool is equipped. Suffixed 0 — 8y
0
I edited my answer itsJooJoo 195 — 8y
Ad

Answer this question