Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I properly use the new() method?

Asked by
KelcriC -1
5 years ago
    local placementHandler = require(script:WaitForChild("PlacementModule"))

local base = workspace.Base

local items = game:GetService("ReplicatedStorage").items

local bee = base.Baseplate

local blee = base.ItemHolder

plane = placementHandler:new(bee, blee, 3)



local dummymodel



local function initiateplacement(itemname)

dummymodel = items[itemname]:clone()

for _, object in pairs(dummymodel:GetChildren()) do

if (object:IsA("BasePart")) then

object.CanCollide = false

end

end

dummymodel.Parent = workspace

plane:enable(dummymodel)

end



wait(3)



initiateplacement("Cash")

This is in a local script, and this is the error message attempt to call method 'new' (a nil value)

0
Your thing is in a module so we don't know Sapppower 17 — 5y
0
Both your answers are wrong @RobloxWhizYT @TerminusEstKuldin aaaa User#24403 69 — 5y

Answer this question