``I've searched the question I've asked, but the answer was pretty much to weld the weapon to the player's right hand and use hopperbins.
**
Code errors: The weapon doesn't weld into its original place.
If this helps, I want it to be like the weapons you see in the ROBLOX game, Shard Online.
(I am using r15 in this script, but it would help me if you could tell me how to turn off r15.)
Code Info: This is a LocalScript located in the StarterPack. There are two unions inside of the LocalScript. The two unions are called Blade and Handle.
Code so far:
local UserInput = game:GetService("UserInputService") local Player = game:GetService("Players").LocalPlayer local Character local RightHand local Enabled = true local Equipped = false --Equip Function-- local function Equipped(key, GPE) if not Enabled then return end Enabled = false if key.KeyCode == Enum.KeyCode.Q and not GPE then if not Equipped then for _,v in pairs(script:GetChildren()) do if v.ClassName == "UnionOperation" or v.ClassName == "Part" or v.ClassName == "WedgePart" then local new = v:Clone() new.Parent = Character end end local Handle = Character:FindFirstChild("Handle") local Blade = Character:FindFirstChild("Blade") local weld = Instance.new("ManualWeld", Handle) weld.Part0, weld.Part1 = Handle, RightHand weld.C0 = Handle.CFrame:toObjectSpace(RightHand.CFrame) local weld = Instance.new("ManualWeld", Handle) weld.Part0, weld.Part1 = Handle, Blade weld.C0 = Handle.CFrame:toObjectSpace(Blade.CFrame) Equipped = true elseif Equipped then for _,v in pairs(Character:GetChildren()) do if v.ClassName == "UnionOperation" or v.ClassName == "Part" or v.ClassName == "WedgePart" then if v.Name == "Blade" or v.Name == "Handle" then v:Destroy() end end end Equipped = false end end Enabled = true end ------------------ UserInput.InputBegan:connect(Equipped) --Gets Character-- local function GetCharacter(char) Character = char RightHand = Character:WaitForChild("RightHand") end if Player.Character then GetCharacter(Player.Character) end Player.CharacterAdded:connect(GetCharacter) ------------------
Basically, I want to know the best methods to make an efficient non-tool and non-hopperbin weapon. I also want to know if there is an easier way to weld.
A LocalScript in StarterPack or StarterGui can solve your problem very easily. You need to put your model in a storage folder like ReplicatedStorage, then weld handle part of the weapon to character's hand every time character spawns. To make it more efficiently, you can use Keyboard Input for pulling out and in your weapon. All of those scripts needs to be local in order to get mouse, get keyboard input and get player and character easily. I made a sword myself two weeks ago by using this technique. It works, but takes long time if you are going to use too much feature.