Hello! I would like to learn how to put my sword on the players hip, however I am unsure how I do this. Do I use a motor6d, or is it more complicated/easy than that? Please help.
(I am not looking for entire scripts, I am only looking for ideas as to how to accomplish this.)
1 Like
if i were you i would use weldconstraint, i’m sure it will be healthier and easier
1 Like
Alright but where would I put the weld constraint? Would I have to create a part where the sword should be placed when the player joins the game? And then weld the sword to that part, and use a motor6d to connect the part to the player’s character?
1 Like
you don’t need to use any motor6d, you don’t need to part and weld it
If Part1 and Part0 of weld constraints are moved, they will not break.
in short our sword
Using CFrame we can equate character’s hip to CFrame
1 Like
Alright. I want to place the sword on the lower region of the player’s torso. Something like this:
How would I use CFrame to do that?
2 Likes
local pl=game:GetService("Players")
local sword=script:WaitForChild("Sword")
function playercome(p)
p.CharacterAdded:Connect(function(c)
wait()
local torso=c:WaitForChild("Torso")
local swclone=sword:Clone()
swclone.Parent = c
local newconst=Instance.new("WeldConstraint",swclone)
newconst.Part0=swclone
newconst.Part1=torso
swclone.CFrame = torso.CFrame * CFrame.new(2,0,0)
end
end
pl.PlayerAdded:Connect(function(playercome)
just gave an example
2 Likes