I’m scripting a part that is supposed to be welded onto the character’s right hand but instead it keeps dropping to the baseplate upon spawning. I’ve looked over my code over and over but everything seems to be order, i’ve no idea why the weld is not working.
Here’s the script:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Throw = ReplicatedStorage:WaitForChild("HammerEvent",5)
local CallBack = ReplicatedStorage:WaitForChild("CallbackEvent")
local WeaponFolder = script.Weapon
local ServerStorage = game:GetService("ServerStorage")
local RunService = game:GetService("RunService")
local NotEnabledTime = 2
local EnableTime = 0
local Enable = true
local Players = game.Players
Players.PlayerAdded:Connect(function(Player)
Player.CharacterAdded:Connect(function(Character)
local Folder = Instance.new("Folder",Character)
Folder.Name = Player.Name.."'s Mjolnir"
local RightHand = Character:WaitForChild("RightHand")
local Mjolnir = WeaponFolder.Mjolnir:Clone()
Mjolnir.CFrame = RightHand.CFrame
local Weld = Instance.new("Weld")
Weld.Part0 = Mjolnir
Weld.Part1 = RightHand
Weld.C1 = CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0)) * CFrame.new(0,.5,-.185)
Weld.Parent = RightHand
Mjolnir.Parent = Folder
end)
end)
What exactly is the issue? Btw I don’t know if it’s important to add, but the hammer is nothing more than an ordinary part with a mesh. Do I have to set a primaryrootpart or something?