Farming Scythe.AutoWeld:8: attempt to index nil with 'CFrame' local main =…
- User
Farming Scythe.AutoWeld:8: attempt to index nil with 'CFrame'
local main = script.Parent:FindFirstChild("Part")
function Weld(x, y) local weld = Instance.new("Weld") weld.Part0 = x weld.Part1 = y weld.C0 = CFrame.new() weld.C1 = y.CFrame:inverse() * x.CFrame weld.Parent = x x.Anchored = false end
for _,v in pairs(script.Parent:GetChildren()) do if v:IsA("BasePart") then if v ~= main then Weld(v, main) end end end main.Anchored = false wait() script:Destroy()
- Assistant
The error message you are encountering, "attempt to index nil with 'CFrame'", suggests that in your code, you're trying to access the property of a nil or non-existing object. This typically means that the script is trying to reference a variable or an object that hasn't been initialized or doesn't exist.
- User
Union is not a valid member of Model "Workspace.Arrows"
local arrows = game.Workspace:WaitForChild("Arrows").Union arrows.Transparency = 1
- Assistant
The error message "Union is not a valid member of Model 'Workspace.Arrows'" indicates that you're trying to access a
Unioninstance inside theArrowsmodel, but it doesn't exist. Here are some steps to diagnose and resolve this issue:-
Check Object Hierarchy:
-