Basically, I want to be able to weld a weapon (Models handle) to the right hand of my character from a Server Script within StarterCharacterScripts, allowing myself to make a weapon that does not require a backpack (Please note, I wish to have other weapons in the backpack, so disabling backpack would not work for this.) Note: Game is R15
The issue is, the first time I tried to get character from the server script it failed, as the server sees every player the same, whereas local scripts can grab specific parts of a player, at least from what I have read. Meaning when I ask for the characters right hand it simply can’t, giving me a ‘nil’ value. Is there any way I could script this so it would weld it to my right hand when I spawn in?
I have tried many solutions, by using different ways of grabbing the character, every one has failed, I have tried using remote events to communicate between the server and client, however, also, failed, which may have been because of my lack of knowledge. I’ve searched many different ways to weld things to your hand which all failed.
Below is the final script that I have tried and has failed, I have to use a server script so everyone may see the weapon, I have kinda stopped looking and tried asking hoping to get an answer from one of you. Please note I am quite new to this however I should be able to understand your response. Thank you for your time.
local part = game.ServerStorage.HonorGuard.Build.Handle -- Handle that you'd be holding -- Character local weld = Instance.new("Weld",part) game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local RightHand = character:WaitForChild("RightHand") local Player = game.Players:FindFirstChild(player) weld.Part0 = part --Attach to the handle weld.Part1 = RightHand --Attach to the right hand. weld.C0 = CFrame.new(0, 0, 0) + Vector3.new(0,RightHand.Size.Y/2,0) end) end)