|
I'm trying to make a script that would unequip and remove a tool from a player.
However, I am confused on how to do so.
Does anyone have any examples? |
|
mycheezeJoin Date: 2011-06-27 Post Count: 6748 |
You get a script that finds the player's starterpack and finds the tool and removes it. |
|
|
nope
find their Backpack and remove it
i don't think this will unequip it though |
|
|
Actually when a tool is equipped on a player and is being used it cannot be removed using Backpack. |
|
zars15Join Date: 2008-11-10 Post Count: 9999 |
Why unequip and delete, when you can just simply delete. When player has equipped a tool, it will get moved from backpack to character. So while you are deleting tools, do this:
for num,obj in pairs(character:GetChildren()) do
if obj:IsA("Tool") then
obj:Destroy()
end
end |
|
|
Ok,so u want it to unequipp without them doing so?
plrname = "nameofplrhere"
Workspace[""..plrname..""]ToolName.Parent = game.Players[""..plrname..""].Backpack |
|
|
Actually like guy a couple above me said,just remove it,it'll be unequipped |
|
|
It's one of those weird tools that when you remove it from the player it wouldn't let you equip a new one |
|
|
@island
Your script actually worked.
I'll probably use it.
Thanks. |
|
|
BEART12Join Date: 2008-10-22 Post Count: 3190 |
Right this is how i did it and it worked:
Checked player for a tool
put it into players backpack and remove, it unequipped's it if you send it to backpack as player has not got a tool. |
|
|