Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Why is the part allways inside of the upper torso?

Asked by 13 days ago

Even those I added this line "conect.Parent.Staff.CFrame = conect.Parent.UpperTorso.CFrame * CFrame.new(0,10,5)", the part is allways inside of my upperTorso instead of having a gap of 0,10,5 from it... Why is that so?

function weapon()

wait(1)
local char = game.Players.LocalPlayer.Character



local conect = Instance.new("Weld", char)
local staff = Instance.new("Part", char)

staff.Name = "Staff"
print("hi dafa")

staff.CanCollide = false



conect.Part0 = staff



conect.Parent.UpperTorso.Locked = false

conect.Part1 = conect.Parent.UpperTorso
conect.C0 = char.UpperTorso.CFrame:inverse()
conect.C1 = char.UpperTorso.CFrame:inverse()

conect.Parent.Staff.CFrame = conect.Parent.UpperTorso.CFrame * CFrame.new(0,10,5)
end



game.Players.LocalPlayer.CharacterAdded:Connect(weapon)


0
Because the weld moves it User#26471 0 — 13d

1 answer

Log in to vote
0
Answered by
Lunno 0
13 days ago

You forgot the .Position behind .CFrame that means you have to type for example conect.Parent.UpperTorso.Position.CFrame

Ad

Answer this question