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

Backpack nil Sword?

Asked by
korj5 0
10 years ago

Let do ask question again.

I made mistaken grammar.

Since I removed backpack, health at the fort.

But problem is, backpack is gone, sword cannot be pick up.

How I can insert sword in the character?

By the way, I am not script writer.

1 answer

Log in to vote
0
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
10 years ago

Add this to a script in the sword:

local connection=script.Parent.Handle.Touched:connect(function(hit)
    if hit.Parent:findFirstChild("Humanoid")and not script.Parent.Parent:findFirstChild("Humanoid")then
        script.Parent=hit.Parent
    end
end)
if script.Parent.Parent~=workspace then
    connection:break()
end

This will automatically insert the tool into the character when the character touches it, but only if the tool is in workspace.

0
Nope, when you respawn, a sword automatically holding korj5 0 — 10y
0
That wasn't your question. 1waffle1 2908 — 10y
0
Well well, I will ask my friend then. Thank you for your advice and help! korj5 0 — 10y
Ad

Answer this question