Hey! I’m trying to set the position of a cloned part, however, I get this error.
local EasterEggsFolder = RS:WaitForChild("EasterEggs")
local LocationsEggs = workspace:WaitForChild("EasterEggsLocations")
local currentEggLocation
local function getRandomEggLocation()
for i, v in pairs(LocationsEggs:GetChildren()) do
currentEggLocation = v.Name
end
end
local collectedEggs = player:WaitForChild("EasterFolder"):WaitForChild("EggsCollected")
EggsEvent.OnClientEvent:Connect(function()
getRandomEggLocation()
local eggToClone = EasterEggsFolder:FindFirstChild("Egg"..collectedEggs.Value + 1):Clone()
eggToClone.Parent = workspace
eggToClone.CFrame.Position = LocationsEggs[currentEggLocation].CFrame.Position
end)