Why can’t I weld a part to the player which is not in the player character? This code works fine:
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local testPart = Instance.new("Part")
testPart.CanCollide = false
testPart.Parent = Character
local Weld = Instance.new("Weld", testPart)
Weld.Part0 = Character.HumanoidRootPart
Weld.Part1 = testPart
Weld.C1 = CFrame.new(2, -1, 0)
But this one doesn’t:
local Player = game:GetService("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local testPart = Instance.new("Part")
testPart.CanCollide = false
testPart.Parent = workspace
local Weld = Instance.new("Weld", testPart)
Weld.Part0 = Character.HumanoidRootPart
Weld.Part1 = testPart
Weld.C1 = CFrame.new(2, -1, 0)