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

My swords dont work in any gear givers whatsoever. How is this possible? [closed]

Asked by 6 years ago
Edited 6 years ago

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.

01wait (.1)  -attack animations
02local CanAttack = true
03 
04script.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()
09end)
10 
11script.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 
15if CanAttack == true then
View all 25 lines...
01wait (.1) --equip ani
02wait(1)
03local tool =script.Parent
04local plr=game:GetService("Players").LocalPlayer
05local equipped = false
06local anim = game:GetService("ReplicatedStorage").INSERT_ME_IN_REPLICATED_STORAGEEquip_ANI
07local equip = plr.Character.Humanoid:LoadAnimation(anim)
08tool.Equipped:connect(function()
09    equipped = true
10    equip:Play()
11end)
12tool.Unequipped:connect(function()
13    equipped = false
14    equip:Stop()
15end)
01local SP = script.Parent --welding script
02for _, 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.Part0=Previous
07            Weld.Part1=V
08            Weld.C0=Previous.CFrame:inverse()
09            Weld.C1=V.CFrame:inverse()
10            Weld.Parent=Previous
11        end
12        V.Anchored=false
13        Previous=V
14    end
15end
0
"If you would like me to provide my sword scripts please let me know by posting a comment." THAT’S THE WHOLE POINT OF THIS SITE!! POST YOUR CODE! AND GET HELP! NOT THIS! USE COMMON SENSE! User#19524 175 — 6y
0
Incapaz back at it again... dw Hyped Ill attempt to help you. NoirPhoenix 148 — 6y

Closed as Not Constructive by User#19524, Zafirua, and Link150

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?

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

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:

1local part = script.Parent
2local sword = game.ServerStorage.folder:WaitForChild("Sword")
3 
4part.Touched:Connect(function(hit)
5 
6    local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
7    sword:Clone().Parent = plr.Backpack
8end)

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.

0
This oddly works with other gears but not mine. HypedNebula 28 — 6y
0
hmm this is very weird haha NoirPhoenix 148 — 6y
0
you may have to screen shot your tool using software called Gyazo and link me it NoirPhoenix 148 — 6y
0
Because the cloning part of the weapon into the player shouldn't have anything todo with the scripts of your weapon unless you have a part in the code which removes the tool from the players backpack as soon as it is cloned NoirPhoenix 148 — 6y
0
I just created a Gui that gives you the gear, so anyways thank you for trying to help me. :-) HypedNebula 28 — 6y
Ad