Attempt to call missing method 'GetPivot' of table

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve?
    I Wanna Achieve Item Spawner trying to make it so other parts get the item on drop then one

  2. **What solutions have you tried so far?
    I look for clear Answers on the Platform

image

It’s going to be pretty difficult to give you an answer without code.

1 Like

I know i just wanna see some one replys

Script

local folder = game:GetService(“Workspace”).PartsToSpawn:GetChildren()
local CoolMath = math.random(1,#folder)
print(CoolMath)
while true do
CoolMath = math.random(1)
task.wait(3)
if CoolMath == 1 then
for i = 1,1 do
local folderItems = folder
folderItems:GetPivot(CFrame.new(Random.new():NextInteger(-50, 50), Random.new():NextInteger(-50, 50), Random.new():NextInteger(-50, 50)))
folderItems.Parent = folder
end

First thing I’m noticing is that your code could be cleaned up by a lot. The reason it’s throwing that error is because folderItems is a list of all of the children in PartsToSpawn. You have to get a pivot of either a model or a part, you cannot get the pivot of multiple parts with a single function.

1 Like

how will i do a multiple parts do i do it with more Function how will i do it?

Loop through all the items in the table with a for loop
Also, no offense at all, but do you know what you’re writing? You make a random number between 1 and 1, then check if it’s 1, make another random number that’s never used, use a for loop that only runs once, make a variable equal to a previous variable, then switch to using Random.new instead of math.random.

Never Mind I mess up about my coding you are right the script is too messy and I didn’t code it right I wasn’t sure how to make a item spawner % or mins and Thank you for helping me im just going to recode it.

No problem! Glad that was the solution. Again, I didn’t mean any harm with that, I just want to make sure you aren’t copy and pasting from like YouTube tutorials an don’t understanding what you’re writing

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.