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
11 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
11 years ago

Add this to a script in the sword:

1local connection=script.Parent.Handle.Touched:connect(function(hit)
2    if hit.Parent:findFirstChild("Humanoid")and not script.Parent.Parent:findFirstChild("Humanoid")then
3        script.Parent=hit.Parent
4    end
5end)
6if script.Parent.Parent~=workspace then
7    connection:break()
8end

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 — 11y
0
That wasn't your question. 1waffle1 2908 — 11y
0
Well well, I will ask my friend then. Thank you for your advice and help! korj5 0 — 11y
Ad

Answer this question