#Collision handle issue

22 messages · Page 1 of 1 (latest)

sonic loom
#

this script just check if out of bound, if collide with player, and place

scenic cape
#

@sonic loom are u there?

sonic loom
#

yes

scenic cape
#
local module = require(game.ReplicatedStorage.modules.PlacementHandler)

local placement = module.new(
    4, -- Grid size
    game.ReplicatedStorage.items, -- Item location
    Enum.KeyCode.R, -- Rotate key
    Enum.KeyCode.X  -- Terminate key
)

wait(2)

placement:activate("Toggle", workspace.Baseplate.itemholder, workspace.Baseplate, true)

local mouse = game.Players.LocalPlayer:GetMouse()
local canPlace = true
local placeCooldown = 1 -- 1 second cooldown between placements

mouse.Button1Down:Connect(function()
    if canPlace then
        canPlace = false -- Temporarily disable placement
        placement:place(game.Players.LocalPlayer, "Toggle", workspace.Baseplate.itemholder, placement:getInstantCFrame(), workspace.Baseplate)
        wait(placeCooldown) -- Wait for the cooldown
        canPlace = true -- Re-enable placement
    end
end)
#

@sonic loom u found the issue?

sonic loom
#

no

scenic cape
#

ok

scenic cape
#

all of it?

#

or handle collisions function

sonic loom
#

all

scenic cape
#

found the issue?

#

@sonic loom

sonic loom
#

move it to above if not collide

sonic loom
#

@u

#

@scenic cape