welll, I have a little problem with welds and that is that when they are created and hooked (the character is hooked with a part), the character teleports to the parts when the parts must be teleported with the welds. I honestly don’t know what the problem is.
local function createObject(class, properties, parent)
local obj = Instance.new(class)
for i,v in pairs(properties) do
obj[i] = v
end
obj.Parent = parent
return obj
end
local Head = game.Players.LocalPlayer.Character:WaitForChild("Head")
local Transparency = 0.5
local FolderParts = Instance.new("Folder")
FolderParts.Name = "CamParts"
FolderParts.Parent = workspace
local Parts = {
OnePart = createObject("Part",{CanCollide = false,Transparency = Transparency,Anchored=true}, FolderParts),
TwoPart = createObject("Part",{CanCollide = false,Transparency = Transparency,Anchored=true}, FolderParts),
ThreePart = createObject("Part",{CanCollide = false,Transparency = Transparency,Anchored=true}, FolderParts),
FourPart = createObject("Part",{CanCollide = false,Transparency = Transparency,Anchored=true}, FolderParts),
}
local Welds = {
OneWeld = createObject("Weld",{Part0 = Head, Part1 = Parts.OnePart, C0 = CFrame.new(0,200,0)}, Parts.OnePart),
TwoWeld = createObject("Weld",{Part0 = Head, Part1 = Parts.TwoPart, C0 = CFrame.new(0,100,0)}, Parts.TwoPart),
ThreeWeld = createObject("Weld",{Part0 = Head, Part1 = Parts.ThreePart, C0 = CFrame.new(0,15,0)}, Parts.ThreePart),
FourWeld =createObject("Weld",{Part0 = Head, Part1 = Parts.FourPart, C0 = CFrame.new(0,0.15,12)}, Parts.FourPart)
}