Thank you I was making a horror game about saw and you know that bear trap I wanted to try and I did it all thanks to you. Your reward is a sub and a like
For anyone who this hasn’t worked for, you need a blocky character, my woman avatar did not work out it, I think it may depend on what type of rig builder you use tbh but I’m not sure
I can't believe you aren't 100k+ subs! You have great explanations, making sure that I understand why I'm doing each line of code instead of just the code. Awesome tutorial!
thanks, this helped alot since im a total idiot and even i could understand. Unlike other tutorials this can be used in a more broad category, THANK YOU!
@@Raddius definitely not, perhaps the issue is that I am using a female dummy instead of a standard one, but the standard one does not fit the accessory type
For some reason it just locks me in place and I can’t move anymore. I tried anchoring and unanchoring it and even turning off collisions but I still couldn’t move, any help?
@@LarperGaming yeah i realized u wouldnt be able to move, but can u help with something? i did all right(i have a r6 and i wanted to put it in my right hand) i copied the script then loaded the game then the sword was flying everywhere and sometimes will stop me where i go, the sword isnt anchored.
how would i make it so it only appears on only one players back (like say if someone were to click a part and it would appear on only their back, how would i prevent it from appearing on everyone's back who is in the server at the time)
I got a question. First, this works great and tysm for making this tutorial. I need to unweld the part from the player at a later time, how would I do that?
I have a question! So basically i'm trying to make a avatar editor with custom skirts that i made, but i cant figure out how to get the skirt to equip onto the character. Do you have any tips?
local PS = game:GetService('Players') local SS = game:GetService('ServerStorage') local referenceDummy : Model = SS.ReferenceDummy local function weld(partA : BasePart, partB : BasePart, offsetCFrame : CFrame) partA.CFrame = partB.CFrame * offsetCFrame
local weldConstraint = Instance.new('WeldConstraint') weldConstraint.Part0 = partA weldConstraint.Part1 = partB weldConstraint.Parent = partA end local function onCharacterAdded(character : Model) local newWeld = referenceDummy.Sword:Clone() local weldPart = character:WaitForChild(newWeld.WeldPart.Value.Name) weld(newWeld, weldPart, newWeld.WeldPart.Value.CFrame:Inverse() * newWeld.CFrame) newWeld.Parent = character end PS.PlayerAdded:Connect(function(player : Player) player.CharacterAdded:Connect(onCharacterAdded) end) for i, player in pairs (PS:GetPlayers()) do player.CharacterAdded:Connect(onCharacterAdded)
if (player.Character) then onCharacterAdded(player.Character) end end 2024, October 21 update: Ty all guys for likes and comments, never had so much likes on my comment. I dont even script in roblox anymore, Im GDscript and Node.js scripter now xD. But im still happy see that I helped someone :)
another easy way is to do the way where he welds it at the start, then naming the reference dummy to StarterCharacter and then put it into StarterPlayer
@@mobzter12345 not working for me for some reasoning, im using a custom model on a r6 avatar and im trying to put a gun in the players hand, why doesnt it work?
There is a way to do it without scripts (I used a blender model without scripts) Step 1: insert an r15 dummy Step 2: insert the model you want to use (For me top hat) Step 3: Place the model inside of the dummy in the explorer tab Step 4: position the model to where you want on the dummy Step 5: Click the plus icon next to the r15 model in explorer tab and insert a weld constraint Step 6: Click on the weld constraint and scroll on the properties tab until you see Part 0 and Part 1 Step 7: click on the empty box next to Part 0 and find the part your model is connected to. click that and it should show up as Part 0 Step 8: click the empty box near Part 1 and select the model you want to use (which should be under the R15 model in the explorer tab) (Bonus) If you want to make this the character you spawn in as name the R15 model as "StarterCharacter" and place it in the StarterPlayer tab in explorer (BE AWARE: the puncuation on StarterCharacter must be exact!)
Im trying to do a knife in the right arm of a R6 model, i swapped everything out needed like the name from sword to knife but it still wont show up welded to the arm. im not sure what im doing wrong?
OH i saw i was using a local script and no a normal one, hah. but now im running into the problem Cframe isnt a valid member of "knife" is this because knife is a two part model? (one for the blade and one of the handle part/mesh)
I was able to get the handle of the knife welded and to my character, but it was very off and more like on top of my head, though it was welded to my actual arm it wasn't were i want it
TH-camr was writing it step by step, taking away half of the video and has a commenter type the script instead of pasting in description. How can you become something like this?
How do i make the sword get destroyed at death? Like, i already have the script that destroy it, and is working. But when the character respawn, the sword are created again
im at 2:08 You Feel very True, But Please, Sorry if sound rude but, make a pinned comment of u commenting the script so other people can copy and paste it:)!
I will actually try to use this.. instead to attach my model to the player but make the model as my starter player. So means. I will do my player invisible because the main player will be the model. And will try to attach animations to it like idle, run. If u would ask why your video, because I couldn't find real help around the browser or groups so I will give it a try by myself
hey for some reason the object collides with my body even thought i turned off collisions on the object any ideas? because everytime i walk backwards it sends me forwards because it collides with my leg
i attached my object to the lower leg of the rig, and did all the steps. but as soon as i parent it, it seems to go to the arm of the rig, like he's holding it, please help.
So it works perfectly on blocky R15 characters (Im adding a part to the hand) but when someone joins with a custom hand it doesnt work, is there a way to fix this without forcing a custom player model?
@@Airplanefox77 I just made a script to force blocky R15 characters, no biggie… I don’t know why but the custom mesh hands did not accept the part, like welding it did not work so kids just gonna have fat avatars when they play
@@vamical4362 personally I’m going to make a system where the player chooses the weapon they want, after they select the weapon and spawn into the game then this script will fire giving them the weapon… Im going to do this 1 because it looks so much cleaner than having the player actually using a tool and 2 I believe it will be significantly harder to exploit… however, you do not NEED to do this for every tool and I would recommend not doing this if you are new to coding
This video only works if the bundle that the player is using matches the bundle that the Reference Dummy is using, is there a way to make it work for every bundle?
There are a few things you can do: If your game forces a particular rig, you can use a copy of that rig as your ReferenceDummy. If your game has multiple bundles/rigs, you'd have to have a ReferenceDummy for each one, and then connect that character's bundle to the corresponding ReferenceDummy.
If this still matters to you, then I can sort of help. I'm not sure how to specifically unweld, even more unsure according to this tutorial, but to send info from local scripts to scripts you can use remote events.
for anyone who needs it here is the script: local camera = game.Workspace:WaitForChild("Camera") local char:Model = script.Parent local hrp = char.HumanoidRootPart local mouse = game.Players.LocalPlayer:GetMouse() local distance = 15 local minDistance = 10 local maxDistance = 23 local RunService = game:GetService("RunService") camera.CameraType = Enum.CameraType.Scriptable RunService.RenderStepped:Connect(function() camera.CFrame = CFrame.new(hrp.Position + (hrp.CFrame.UpVector * distance)) * CFrame.Angles(math.rad(-90),0,0) end) mouse.WheelForward:Connect(function() if distance = minDistance then distance -= 1 end end) im pretty sure thats all of it i apologize if it isnt
hello if you're reading this, can you please reply? this only works on my ip or i don't know for others when they're in game it doesn't show but when i'm in game doesn't matter what account i still got it. can you help?
What's the best way to go about modifying this to only equip on your character once you pick up a tool/weapon? I set it up so that my character has the weapon on them when its equipped, however once someone else joins the game, it seems to glitch onto them as well? Not sure what's going on. Thanks for the tutorial by the way, really helped :)
Just change the WeldPart's value to the part you want to weld to. So if you want to weld to the right arm, change the WeldPart's value to the right arm
@@DevinTheDeveloper i have another problem, i did everythibg correctly and it should be on my right hand, yet its not and i get this glitchy thing where the sword moves everywhere
Thank you I was making a horror game about saw and you know that bear trap I wanted to try and I did it all thanks to you. Your reward is a sub and a like
i love it, this video is so much more informative than all the others on youtoube. THX man
For anyone who this hasn’t worked for, you need a blocky character, my woman avatar did not work out it, I think it may depend on what type of rig builder you use tbh but I’m not sure
I'VE BEEN LOOKING FOR THIS, LIKE FOR LIKE AN YEAR NOW. THANKS!
bro forgot how to use google
@@xx_pcgamer_xx6866 thats not works dumbass
@@xx_pcgamer_xx6866 On god
I can't believe you aren't 100k+ subs! You have great explanations, making sure that I understand why I'm doing each line of code instead of just the code. Awesome tutorial!
I loved how you accauly explained what the code does! thx
thanks, this helped alot since im a total idiot and even i could understand. Unlike other tutorials this can be used in a more broad category, THANK YOU!
This is what I have been looking for for 2 years now.👍
sad
@@Slayersword7292 yea i feel bad man :(
bro forgot how to use google
It doesn't weld on the players' heads, it just drops on the ground when I weld on them
same with me
@@Kryth1 anchor the object you want to weld to the character
@@Raddius now it's just stuck in the air
@@diano4kav1asova Then there's something wrong with the script
@@Raddius definitely not, perhaps the issue is that I am using a female dummy instead of a standard one, but the standard one does not fit the accessory type
I LOVE YOUUUUU, I WAS STUCK ON THIS SHI FOR HOURS TYYYYYYYY
Good job. You started few months ago and already so many subscribers! :)
thank u so much i was searching this for ages and I sub and like too
Is it possible to attach a big hollow reflecting ball around the player?
It will make one heck of a cool visual effect!
For some reason it just locks me in place and I can’t move anymore. I tried anchoring and unanchoring it and even turning off collisions but I still couldn’t move, any help?
u probably using custom animations
this is way too useful, thank you so much!
Can you now please make a tutorial: how to wield a sword to a player and animate it
As a tool?
@ nah, its always on you
for people who get a error : make sure your avatar is the same model as the dummy r15 or r6
THANK YOU BRO YOU DONT KNOW HOW MUCH THIS HELPED
why does it keep saying CFrame is not a valid part of my sword?
The sword just falls to the floor and does not weigh on the back :(
u not do it right :[
try making the sword anchored
@@kokuno. I know that this is was 3 minutes but this is a horrible idea 🗣️🔥💯
@@LarperGaming yeah i realized u wouldnt be able to move, but can u help with something? i did all right(i have a r6 and i wanted to put it in my right hand) i copied the script then loaded the game then the sword was flying everywhere and sometimes will stop me where i go, the sword isnt anchored.
try this
------------------------
game.Players.LocalPlayer.CharacterAdded:Connect(function(char)
local Sword = game.ServerStorage.ReferenceDummy.Sword:Clone()
Sword.CFrame = char.Torso.CFrame --adjust the sword CFrame here
Sword.Parent = char
local weld = Instance.new("WeldConstraint")
weld.Name = "SwordWeld"
weld.Parent = char
weld.Part0 = char.Torso
weld.Part1 = Sword
end)
how would i make it so it only appears on only one players back (like say if someone were to click a part and it would appear on only their back, how would i prevent it from appearing on everyone's back who is in the server at the time)
use remote event
maybe use a local script
Can you make it get invisible when you pull the tool out?
thats what im wondering
use the equip function and change the transparency of this model to 1 when the tool is equipped
@@backhack7154 ts did not work
Is it possible to use models instead of parts trough changnging the script?
it works! Very Helpfull!
I got a question. First, this works great and tysm for making this tutorial. I need to unweld the part from the player at a later time, how would I do that?
weldcontraint:Destroy()
I have a question! So basically i'm trying to make a avatar editor with custom skirts that i made, but i cant figure out how to get the skirt to equip onto the character. Do you have any tips?
bro, can u make a tutorial like this video, in inventory u can weld by pressing button clothes or accesories?
Is there a way that only a certain player can have it
Like I want my admin to have a certain item that distinguish them from normal players
local PS = game:GetService('Players')
local SS = game:GetService('ServerStorage')
local referenceDummy : Model = SS.ReferenceDummy
local function weld(partA : BasePart, partB : BasePart, offsetCFrame : CFrame)
partA.CFrame = partB.CFrame * offsetCFrame
local weldConstraint = Instance.new('WeldConstraint')
weldConstraint.Part0 = partA
weldConstraint.Part1 = partB
weldConstraint.Parent = partA
end
local function onCharacterAdded(character : Model)
local newWeld = referenceDummy.Sword:Clone()
local weldPart = character:WaitForChild(newWeld.WeldPart.Value.Name)
weld(newWeld, weldPart, newWeld.WeldPart.Value.CFrame:Inverse() * newWeld.CFrame)
newWeld.Parent = character
end
PS.PlayerAdded:Connect(function(player : Player)
player.CharacterAdded:Connect(onCharacterAdded)
end)
for i, player in pairs (PS:GetPlayers()) do
player.CharacterAdded:Connect(onCharacterAdded)
if (player.Character) then
onCharacterAdded(player.Character)
end
end
2024, October 21 update:
Ty all guys for likes and comments, never had so much likes on my comment. I dont even script in roblox anymore, Im GDscript and Node.js scripter now xD. But im still happy see that I helped someone :)
Thank you!
Legend
legend thx
Hey i need some help since i put the model in a folder (it's a tower defense game) and i need help how to get it to work with the folder
nvm fixed it!
another easy way is to do the way where he welds it at the start, then naming the reference dummy to StarterCharacter and then put it into StarterPlayer
true
i subbed bro ur the only guy who made this
bro does it work cause this is 2024
ye it does work in 2024 i did it 2 weeks ago
@@mobzter12345 not working for me for some reasoning, im using a custom model on a r6 avatar and im trying to put a gun in the players hand, why doesnt it work?
@@CoolMilkYT make the weld part value selected to right or left hand, and make sure it’s a a part or union not model
Could you do this for Models?
no
can i weld it with particles?
There is a way to do it without scripts (I used a blender model without scripts)
Step 1: insert an r15 dummy
Step 2: insert the model you want to use (For me top hat)
Step 3: Place the model inside of the dummy in the explorer tab
Step 4: position the model to where you want on the dummy
Step 5: Click the plus icon next to the r15 model in explorer tab and insert a weld constraint
Step 6: Click on the weld constraint and scroll on the properties tab until you see Part 0 and Part 1
Step 7: click on the empty box next to Part 0 and find the part your model is connected to. click that and it should show up as Part 0
Step 8: click the empty box near Part 1 and select the model you want to use (which should be under the R15 model in the explorer tab)
(Bonus) If you want to make this the character you spawn in as name the R15 model as "StarterCharacter" and place it in the StarterPlayer tab in explorer (BE AWARE: the puncuation on StarterCharacter must be exact!)
ty but how can i make the character be whatever the avatar a person joins in instead of the default gray blocky character
tysm it works but why does it not stick if I anchor or unanchor it wont work
i have a question how do i make a realistic cape to go on a specific person?
can you make some videos about data or skill or combat i have some error with it :")
thanks
Im trying to do a knife in the right arm of a R6 model, i swapped everything out needed like the name from sword to knife but it still wont show up welded to the arm. im not sure what im doing wrong?
OH i saw i was using a local script and no a normal one, hah. but now im running into the problem Cframe isnt a valid member of "knife" is this because knife is a two part model? (one for the blade and one of the handle part/mesh)
I was able to get the handle of the knife welded and to my character, but it was very off and more like on top of my head, though it was welded to my actual arm it wasn't were i want it
also, could i ask, how do you make the same thing but with a rope?
I got to the part where hes at the 'weldpart' part, but the menu of the value didnt pop up for me please help
When i did it, the output said “CFrame is not a valid member of model “Zino” pls help
TH-camr was writing it step by step, taking away half of the video and has a commenter type the script instead of pasting in description.
How can you become something like this?
My item has a lot of peices and its grouped together. How do I animate it?
How do i make the sword get destroyed at death? Like, i already have the script that destroy it, and is working. But when the character respawn, the sword are created again
im at 2:08 You Feel very True, But Please, Sorry if sound rude but, make a pinned comment of u commenting the script so other people can copy and paste it:)!
skid
I will actually try to use this.. instead to attach my model to the player but make the model as my starter player. So means. I will do my player invisible because the main player will be the model. And will try to attach animations to it like idle, run. If u would ask why your video, because I couldn't find real help around the browser or groups so I will give it a try by myself
what if i want to make it weld only when the player clicks a button? (im not very good with events)
How would you go about by doing this for a model with several meshparts?
Weld them all to one main part in the model, then treat that part as the part you want to weld to your character
what if its not in the position you want it to be btw@@DevinTheDeveloper
how do you weld more objects?
Theres a built in accessory thing to put items on rigs now
where? how do i get it?
This doesn't work for me the part just falls right off
im connecting a rope to my character but it keeps getting stuck. can you help?
it says CFrame is not a valid member of Model "Saya" what to do?
SAME
Thanks you a lot!!
I'm in the up-to-date version
How do you get the explorer thingy?
Can you help me i followed the video and it still just falls off
hey for some reason the object collides with my body even thought i turned off collisions on the object any ideas? because everytime i walk backwards it sends me forwards because it collides with my leg
There might be multiple parts. If that's not the case, try setting all the parts' Massless property to true.
@@DevinTheDeveloper Its not working.
i attached my object to the lower leg of the rig, and did all the steps. but as soon as i parent it, it seems to go to the arm of the rig, like he's holding it, please help.
Check the value property of the weldObject. The value may not be pointed to the lower leg. If it isn't that, make sure your cframe is inversed
@@DevinTheDeveloper How can I inverse it in the code?
and what im attaching is a model
its not showing my sword?
i wanted to do right arm
How can I make this happen if someone’s using a proximity prompt instead of automatically adding the accessory
Prompt.Triggered:Connect and then run the code used in the character added function
So it works perfectly on blocky R15 characters (Im adding a part to the hand) but when someone joins with a custom hand it doesnt work, is there a way to fix this without forcing a custom player model?
I don't Know
Sorry I wish I knew
@@Airplanefox77 I just made a script to force blocky R15 characters, no biggie… I don’t know why but the custom mesh hands did not accept the part, like welding it did not work so kids just gonna have fat avatars when they play
@@oerlikon20mm29 we need todo this with every weapon?
@@vamical4362 personally I’m going to make a system where the player chooses the weapon they want, after they select the weapon and spawn into the game then this script will fire giving them the weapon… Im going to do this 1 because it looks so much cleaner than having the player actually using a tool and 2 I believe it will be significantly harder to exploit… however, you do not NEED to do this for every tool and I would recommend not doing this if you are new to coding
How will I be able to make it like when you equip a tool it destroys the weld, and if you unequip it make a new one
Nvm I figured it out
This video only works if the bundle that the player is using matches the bundle that the Reference Dummy is using, is there a way to make it work for every bundle?
There are a few things you can do:
If your game forces a particular rig, you can use a copy of that rig as your ReferenceDummy.
If your game has multiple bundles/rigs, you'd have to have a ReferenceDummy for each one, and then connect that character's bundle to the corresponding ReferenceDummy.
What do i do if i want to equip the item and than the part on my back dissapears?
Hook up a function to when you equip the tool that changes the transparency of all the parts, and disables all fx in the welded model on your back.
Hey so do I have todo this with every weapon?
If you cant walk after you have done this, its probably because its anchored :]
THANKS I HAD THAT PROBLEM
How do you unweld something? I’m trying to make it a key one that will destroy it on keybind press but I need a local script to do so.
If this still matters to you, then I can sort of help. I'm not sure how to specifically unweld, even more unsure according to this tutorial, but to send info from local scripts to scripts you can use remote events.
@@imLIKEthat837 thank you I found it out a long time ago but thank ya!
for anyone who needs it here is the script:
local camera = game.Workspace:WaitForChild("Camera")
local char:Model = script.Parent
local hrp = char.HumanoidRootPart
local mouse = game.Players.LocalPlayer:GetMouse()
local distance = 15
local minDistance = 10
local maxDistance = 23
local RunService = game:GetService("RunService")
camera.CameraType = Enum.CameraType.Scriptable
RunService.RenderStepped:Connect(function()
camera.CFrame = CFrame.new(hrp.Position + (hrp.CFrame.UpVector * distance)) * CFrame.Angles(math.rad(-90),0,0)
end)
mouse.WheelForward:Connect(function()
if distance = minDistance then
distance -= 1
end
end)
im pretty sure thats all of it i apologize if it isnt
this is NOT the script
@@killa_captain i mean i copy pasted it the best i could
if you want you can do it yourself
@@TDP_MIMIKYU can u paste the actual on epls
i tried put the sword in my dummy's right hand, but it falls ._.
i have the same problem i tried putting a sword on the leg and the sword falls
Does it work with accessories?
hello if you're reading this, can you please reply?
this only works on my ip or i don't know for others when they're in game it doesn't show but when i'm in game doesn't matter what account i still got it. can you help?
What's the best way to go about modifying this to only equip on your character once you pick up a tool/weapon? I set it up so that my character has the weapon on them when its equipped, however once someone else joins the game, it seems to glitch onto them as well? Not sure what's going on.
Thanks for the tutorial by the way, really helped :)
maybe because the script you used was a server script and not a local script
How would i implement the weld/clone disappearing when the tool itself is equipped if it was a sword and then reappearing on unequip?
make it transparent (the tool) or something when the player equips it
@@oppalus nah
my roblos say that newweld dont have a cFrame
I like weld avatar accesory (no scripting)
I want making a Hair
Will this work in the animator?
team accessory tutorial plis
how do i make it not disappear when i go 1st pov
How do I weld something on the player head because if I do so the object just drops on the ground
Change the weldpart ObjectValue's value to the part you want to weld to
@@DevinTheDeveloper i did but its just drop and is not welded, just when i weld it to the head
I just tried what you said and it all works fine. Contact me on the devforum @ADRENALXNE, maybe I'm misunderstanding you.
im also having the same problem
@@DevinTheDeveloperdoes this work on r6?
ServerScriptService.Script:29: missing argument #1 to 'pairs' (table expected)
what about the teams?
does it work on custom Animations?
Doesnt Work For Me. Please Help.
How'd you copy it?
i hink there better use Accesory,isnt it?
mesh parts
@@oppalus disagree.Its gets very complicated if do so
aw man it doesnt work :(
how do you add items to a girl's body?
The process is the same for any humanoid rig
@@DevinTheDeveloper I've tried in the video it works and I want to add it for girls but it can't and it doesn't appear behind the body
Its a bjt hard to see the codes u are typing
Will make it bigger next time, sorry!
@@DevinTheDeveloper thabks man preciate it
how would i weld models??
press play, or if you’re talking about an NPC, you can put an attachment on the NPC
Thanks
TYSMmm
does this need to be in r15 or does r6 work too?
r15
works with r6 too
thanks.
tysm bro
why inventing bycicle if we already have one?
same here Accesory and Weld:
am i joke to you?
ehh i dont know how to script
can i have some?
oh no i wondered why bad quality, but its beacuse i had it on 360 ghrapics lol
what if i want it on my right arm
Just change the WeldPart's value to the part you want to weld to. So if you want to weld to the right arm, change the WeldPart's value to the right arm
@@Xalior2 , turn off the collisions of it and it should work.
@@DevinTheDeveloper i have another problem, i did everythibg correctly and it should be on my right hand, yet its not and i get this glitchy thing where the sword moves everywhere
error line 17 index nil with Name