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.
wait (.1) -attack animations local CanAttack = true script.Parent.Activated:connect(function() local idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle) local attack = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack) idle:Play() end) script.Parent.Activated:connect(function() local idle = script.Parent.Parent.Humanoid:LoadAnimation(script.Idle) local attack = script.Parent.Parent.Humanoid:LoadAnimation(script.Attack) if CanAttack == true then attack:Play() idle:Stop() CanAttack = false wait(1) attack:Stop() idle:Play() CanAttack = true script.Parent.CanDamage.Value = true end end)
wait (.1) --equip ani wait(1) local tool =script.Parent local plr=game:GetService("Players").LocalPlayer local equipped = false local anim = game:GetService("ReplicatedStorage").INSERT_ME_IN_REPLICATED_STORAGEEquip_ANI local equip = plr.Character.Humanoid:LoadAnimation(anim) tool.Equipped:connect(function() equipped = true equip:Play() end) tool.Unequipped:connect(function() equipped = false equip:Stop() end)
local SP = script.Parent --welding script for _, V in pairs(SP:GetChildren()) do if V:IsA("BasePart") then if Previous~=nil then local Weld=Instance.new("Weld") Weld.Part0=Previous Weld.Part1=V Weld.C0=Previous.CFrame:inverse() Weld.C1=V.CFrame:inverse() Weld.Parent=Previous end V.Anchored=false Previous=V end end
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:
local part = script.Parent local sword = game.ServerStorage.folder:WaitForChild("Sword") part.Touched:Connect(function(hit) local plr = game.Players:GetPlayerFromCharacter(hit.Parent) sword:Clone().Parent = plr.Backpack 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.
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?