IK1L1
(IK1L1)
#1
Hey devs,
I’m trying to create a script that will weld a part that is dropped onto Plate
.
However, when I move Plate
, the dropped part only mimics the orientation and physics of Plate
but stays where it is.
script.Parent.Touched:connect(function(hit)
if hit.Name == "Plate" then
script.Parent.Position = Vector3.new(hit.Position.X, hit.Position.Y+0.25, hit.Position.Z)
script.Parent.Parent = hit.Parent
local weld = Instance.new("WeldConstraint", hit.Parent)
weld.Part0 = hit
weld.Part1 = script.Parent
end
end)
Any help will be appreciated, thank you!
IK1L1
(IK1L1)
#3
Can someone help me please? charss
Hi IK1l1,
I believe you may have to convert Position to CFrame. If it’s welded that should work.
1 Like
F1ndlay
(F1ndlay)
#5
Give this a go
The line constructing the CFrame is pretty long so I’d recommend splitting it up
system
(system)
Closed
#6
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.