Hello.
I am currently working on making a prop appear when a certain animation event happens, i want so the animation event passes 2 parameters, i dont know how to do this, since i tried adding a comma (ex: prop, right arm) but that just passed both as the same parameter, any help with that would be great.
As well as every time i try to weld the prop to the right arm, it ends up saying “Position cannot be assigned to”
heres a small version of the script
animation:GetMarkerReachedSignal("PropAdd"):Connect(function(propname, limb)
limb = "Right Arm"
print(propname)
if repl.Props:FindFirstChild(propname) and character:FindFirstChild(limb) then
print("Found limb and prop.")
if repl.Props:FindFirstChild(propname):FindFirstChild("Position") and repl.Props:FindFirstChild(propname):FindFirstChild("Orientation") then
print("Creating weld...")
local propclone = repl.Props:FindFirstChild(propname):Clone()
local weld = Instance.new("Weld")
propclone.Parent = character
weld.C0.Position = repl.Props:FindFirstChild(propname):FindFirstChild("Position").Value
weld.C0.Orientation = repl.Props:FindFirstChild(propname):FindFirstChild("Orientation").Value
weld.Part0 = propclone
weld.Parent = character
weld.Part1 = character:FindFirstChild(limb)
end
end
end)
Note: the prop has 2 vector 3 values, Position, and Orientation.
Any help is appreciated!