Hey! Newbie here. Recently tried to apply my first script but failed I would appreciate your help if you have time..
Something simple for start:
Want to attach objects on an animated mesh. For example a horn to a Raptor.
- Found the following script here (Redirecting...):
local MESH = script.parent
local allObjects = MESH:GetChildren()
for _,obj in ipairs(allObjects) do
if obj:IsA("Folder") then
local socketName = obj.name
local pos = obj:GetWorldPosition()
local rot = obj:GetWorldRotation()
MESH:AttachCoreObject(obj, socketName)
obj:SetWorldPosition(pos)
obj:SetWorldRotation(rot)
end
end
- Changed "Folder" to "Horn" and add it on hierarchy like this in photo.! attach|458x110
Questions:
- Which parts exactly do I have to modify? Is Folder to Horn correct? Need also to specify somewhere the socket? The issue I have most times is not being sure which parts of codes needed to change๐
- Is the hierarchy I did correct? Thanks