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

how do i make the placement system more detail in desc ?

Asked by 5 years ago

i made the script but the out said Players.TheBossOfNew.PlayerGui.ScreenGui.Placement:3: ')' expected (to close '(' at line 1) near 'local' idk what to do

the script is

local placementHandler = require(script:WaitForChild("PlacementModule")

    local base = workspace.Base
    local items = game.GetService("ReplicatedStorage").Items
    local plane = placementHandler).new(base.Baseplate, base.ItemHolder, 3)


    local dummyModel
    local signal
    local currentItemName

    local function canclePlacement()
        if (currentItemName) then
            plane:disable()
            if (dummyModel.Parent) then
                dummyModel:Destroy()
            end
            dummyModel = nil
            signal =  nil
            currentItemName = nil
        end
    end

    local function initiatePlacement(ItemName)
        canclePlacement()

        dummyModel = items[itemName]:clone()
        currentItemName = itemName

        for _, object in pairs(dummyModel:GetChildern()) do
            if (object:IsA("BasePart")) then
                object.CanCollide = false
            end
        end

        dummyModel.Parent = workspace

        local signal = plane:enable(dummyModel)

        signal:connect(function(location, _)
            game:GetService("ReplicatedStorage").CilentPlaced:FireServer(currentItemName, location[1])

            canclePlacement()
        end)
    end

    wait(3)

    initiatePlacement("Alpha Dropper")


1 answer

Log in to vote
1
Answered by
zblox164 531 Moderation Voter
5 years ago

This should fix it. You wrote this:

local placementHandler = require(script:WaitForChild("PlacementModule") --you need one more closing )

And here's the fix:

local placementHandler = require(script:WaitForChild("PlacementModule")) -- Added the closing )

This should fix your problem!

0
true User#19524 175 — 5y
Ad

Answer this question