How would I make it so when the player equips the weapon, it doesn’t show at the bottom and instead is just on the character.
So not like this:
How would I make it so when the player equips the weapon, it doesn’t show at the bottom and instead is just on the character.
So not like this:
You can use CFrames and WeldConstraints to get a good result.
https://developer.roblox.com/en-us/api-reference/class/WeldConstraint
Here’s some sample code:
local sword = ReplicatedStorage.Assets.Sword:Clone()
sword.CFrame = character["Right Arm"].CFrame * CFrame.Angles(0, math.rad(180), math.rad(90)) * CFrame.new(-1, 0, 1.75)
sword.Parent = character
local weld = Instance.new("WeldConstraint")
weld.Part0 = sword
weld.Part1 = character["Right Arm"]
weld.Parent = sword
This was used in a remote event which is why I was able to grab the character.
CFrame.Angles() with math.rad() controls rotation, while CFrame.new() controls the offset of the sword.
RESULT: