ASTROCPF
(KingPlatinum)
November 24, 2022, 2:53pm
#1
This is what I want it to look like:
How it looks in the game:
Code (its a script inside the red circle)
local weld = Instance.new("Weld")
weld.Parent = script.Parent.Parent.HumanoidRootPart
weld.Part0 = script.Parent.Parent.HumanoidRootPart
weld.Part1 = script.Parent
local weld2 = Instance.new("Weld")
weld2.Parent = script.Parent
weld2.Part0 = script.Parent
weld2.Part1 = script.Parent.Parent.HumanoidRootPart
1 Like
ASTROCPF
(KingPlatinum)
November 24, 2022, 2:59pm
#2
Maybe there is a way to set the position?
7z99
(cody)
November 24, 2022, 3:03pm
#3
You’d probably have to set the weld’s C0 or C1 property to be the red part’s CFrame relative to the humanoid root part (so like weld.C1 = humanoidRootPart:ToObjectSpace(redPart.CFrame)
). You’re also making 2 welds, you should only need 1 here.
2 Likes
why do you have two welds? only one is required.
nevertheless, you have the set the C1 to a position/cframe at the feet of the character (whatever that position is)
1 Like
Use a WeldConstraint instead of Weld
ASTROCPF
(KingPlatinum)
November 24, 2022, 3:09pm
#6
Like this? this doesn’t work
local weld = Instance.new("Weld")
weld.Parent = script.Parent.Parent.HumanoidRootPart
weld.C0 = script.Parent
weld.C1 = script.Parent.Parent.HumanoidRootPart:ToObjectSpace(script.Parent.CFrame)
ASTROCPF
(KingPlatinum)
November 24, 2022, 3:09pm
#7
WeldConstraints don’t work for me very well.
xGOA7x
(Cairo)
November 24, 2022, 3:10pm
#8
Couldnt you just set a Offset 2 Studs Below the Actual Position?
Redluo
(Redluo)
November 24, 2022, 3:11pm
#9
local weld = Instance.new("Motor6D")
weld.Parent = script.Parent.Parent.HumanoidRootPart
weld.Part0 = script.Parent.Parent.HumanoidRootPart
weld.Part1 = script.Parent
script.Parent.Position = script.Parent.Parent.HumanoidRootPart.Position - Vector3.new(0,2,0)
Use a motor6D since they don’t break when you move the parts.
1 Like
7z99
(cody)
November 24, 2022, 3:11pm
#10
The C0 and C1 properties are CFrames, so like:
local weld = Instance.new('Weld')
local redPartRelativeToRoot = humanoidRootPart:ToObjectSpace(redPart.CFrame)
weld.Part0 = redPart
weld.Part1 = humanoidRootPart
weld.C1 = redPartRelativeToRoot
HP5C
(HP5C)
November 24, 2022, 3:11pm
#11
Use a Motor6D weld Instead of a normal weld
xGOA7x
(Cairo)
November 24, 2022, 3:12pm
#12
Im Pretty sure a Motor6D will do the exactly the same thing besides the fact it can be used for animation
system
(system)
Closed
December 8, 2022, 3:12pm
#13
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.