I have three different swords that were all made by me and any, I mean any gear givers don't work with it. I have a Handle, it's a tool, and the swords actually work properly.
If you would like me to provide my sword scripts please let me know by posting a comment.
01 | wait (. 1 ) -attack animations |
02 | local CanAttack = true |
03 |
04 | script.Parent.Activated:connect( function () |
05 | local idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle) |
06 | local attack = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack) |
07 |
08 | idle:Play() |
09 | end ) |
10 |
11 | script.Parent.Activated:connect( function () |
12 | local idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle) |
13 | local attack = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack) |
14 |
15 | if CanAttack = = true then |
01 | wait (. 1 ) --equip ani |
02 | wait( 1 ) |
03 | local tool = script.Parent |
04 | local plr = game:GetService( "Players" ).LocalPlayer |
05 | local equipped = false |
06 | local anim = game:GetService( "ReplicatedStorage" ).INSERT_ME_IN_REPLICATED_STORAGEEquip_ANI |
07 | local equip = plr.Character.Humanoid:LoadAnimation(anim) |
08 | tool.Equipped:connect( function () |
09 | equipped = true |
10 | equip:Play() |
11 | end ) |
12 | tool.Unequipped:connect( function () |
13 | equipped = false |
14 | equip:Stop() |
15 | end ) |
01 | local SP = script.Parent --welding script |
02 | for _, V in pairs (SP:GetChildren()) do |
03 | if V:IsA( "BasePart" ) then |
04 | if Previous~ = nil then |
05 | local Weld = Instance.new( "Weld" ) |
06 | Weld.Part 0 = Previous |
07 | Weld.Part 1 = V |
08 | Weld.C 0 = Previous.CFrame:inverse() |
09 | Weld.C 1 = V.CFrame:inverse() |
10 | Weld.Parent = Previous |
11 | end |
12 | V.Anchored = false |
13 | Previous = V |
14 | end |
15 | end |
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?
To be honest i'd recommend making your own giver. There fairly easy to do. Here is how i would go about combating this:
1) Make your self a giver (model)
2) insert a script into the part of the model you want to be triggered on touch.
3) insert the weapon inside a folder in 'server storage' for convenience and safety
4) Type some code like this:
1 | local part = script.Parent |
2 | local sword = game.ServerStorage.folder:WaitForChild( "Sword" ) |
3 |
4 | part.Touched:Connect( function (hit) |
5 |
6 | local plr = game.Players:GetPlayerFromCharacter(hit.Parent) |
7 | sword:Clone().Parent = plr.Backpack |
8 | end ) |
Hope this helps :)
BTW: On lines 06-07 there should be some validation (if statements) to make sure that an NPC/Part touches the giver otherwise it may make the giver break.
I'm sure Incapaz will pick up on something though.