Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why is the part allways inside of the upper torso?

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)


1 comment

0

Because the weld moves it

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.