function PlacementController:GetMousePoint(ignoreList)
if mouse.Target ~= nil then
local unitRay = camera:ScreenPointToRay(mouse.x, mouse.y)
local raycastParams = RaycastParams.new()
raycastParams.FilterType = Enum.RaycastFilterType.Blacklist
raycastParams.FilterDescendantsInstances = ignoreList
local ray = workspace:Raycast(unitRay.Origin, unitRay.Direction * range, raycastParams)
if ray then
return ray.Position, ray.Instance, ray.Normal
end
end
end
function PlacementController:Start()
local ignoreList = {char, Sign}
RunService.RenderStepped:Connect(function()
local position, target, normal = self:GetMousePoint(ignoreList)
if target == game.Workspace.Part then
Sign:SetPrimaryPartCFrame(CFrame.new(position))
end
end)
end
Sign stops moving when target is character?