Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Need helping getting this weld script to work properly. Any ideas?

Asked by
zadobyte 692 Moderation Voter
5 years ago
Edited 5 years ago

So basically, I wanna attach a wristband type of accessory onto the characters arm, however, the code I have isn't allowing me to do that

local parent = script.Parent
local PrimaryPart = parent.PrimaryPart
local player = game:GetService("Players").LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local RArm = character["Right Arm"]

local weld = Instance.new("Weld")

weld.Part0 = PrimaryPart
weld.Part1 = RArm
weld.C0 = PrimaryPart.CFrame:inverse()
weld.C1 = RArm.CFrame:inverse()
weld.Parent = PrimaryPart
wait()

What can I fix to get it to weld?

Answer this question