Local script suddenly stalling when calling modulescript function

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

  1. What do you want to achieve? Keep it simple and clear!

I want the folder to be placed in canvas (part in workspace)

  1. What is the issue? Include screenshots / videos if possible!

The script is stalling when i call the modulescript function

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

All of the issues were talking about how there was a loop forever, i had one, but i commented it out, it still doesnt work

Module script function:

function Placement.new(canvasPart)
	local self = setmetatable({}, Placement)

	-- the part we are placing models on
	self.CanvasPart = canvasPart

	-- custom logic depending on if the sevrer or not
	if (isServer) then
		-- create a folder we'll place the objects in
		self.CanvasObjects = Instance.new("Folder")
		self.CanvasObjects.Name = "CanvasObjects"
		self.CanvasObjects.Parent = canvasPart
		-- initiate the twin on the server
		self.CanvasObjects = initPlacement:InvokeServer(canvasPart)

	-- we'll talk about these properties later in the post
	self.Surface = Enum.NormalId.Top
	self.GridUnit = 1
	return self

Local script:

print("Hello World!")
local canvas = game.Workspace.Canvas
local furniture = game.ReplicatedStorage.Furniture
local placementClass = require(game:GetService("ReplicatedStorage"):WaitForChild("Placement"))
local placementObjects = {}


local placement = placementClass.new(canvas)
print("Placement Canvas")
local mouse = game.Players.LocalPlayer:GetMouse()
--mouse.TargetFilter = placement.CanvasObjects

local tableModel = furniture.Table:Clone()
tableModel.Parent = mouse.TargetFilter


--local rotation = 0

--local function onRotate(actionName, userInputState, input)
--	if (userInputState == Enum.UserInputState.Begin) then
--		rotation = rotation + math.pi/2
--	end

--game:GetService("ContextActionService"):BindAction("rotate", onRotate, false, Enum.KeyCode.R)

--	local cf = placementClass:CalcPlacementCFrame(tableModel, mouse.Hit.p, rotation)
--	tableModel:SetPrimaryPartCFrame(cf)
---	print(tableModel.Name)

it runs up to when it prints the function

Anyone have any ideas whats going on?



PS: This is from egomooses furniture placement system, im trying to complete it.

There is an invoke server here. I’m guessing it yields here based on the problem description? Make sure there’s a remote with init placement here.

I was dumb, turns out, i forgot the server listener, Thanks!