Hey! I’m having some issues with my placement system that I’m really not sure of any way of fixing. Whenever you join in-game you can place any tiles next to each other. But the thing is after you rejoin and you try placing it adjacent to the other tile, it’ll “fail”, here’s an example video WITH the output open displaying “colliding” parts: Video
PLEASE, any suggestions are amazing. Here’s my collision script:
local function CheckForTouching(Model)
local isColliding = false
local objectTouched
local Touch = Model.PrimaryPart.Touched:Connect(function() end)
local Touching = Model.PrimaryPart:GetTouchingParts()
for i = 1, #Touching do
if (not Touching[i]:IsDescendantOf(Model)) then
isColliding = true
objectTouched = Touching[i].Name
end
if Touching[i] == workspace.Terrain then
isColliding = false
objectTouched = nil
end
if Touching[i].Name == "Border" then
isColliding = false
objectTouched = nil
end
if Touching[i].Name == "Corner" then
isColliding = false
objectTouched = nil
end
if Touching[i].Name == "MainPlant" then
isColliding = false
objectTouched = nil
end
if Touching[i].Name == "WaterRadius" then
isColliding = false
objectTouched = nil
end
end
local Magnitude = (LocalPlayer.Character.HumanoidRootPart.Position - Model.PrimaryPart.Position).Magnitude
if Magnitude > 25 then
isColliding = true
objectTouched = "Magnitude"
end
if GetTiles() >= ShovelValue then
isColliding = true
objectTouched = "ShovelValue"
end
if objectTouched ~= nil then
print(objectTouched)
end
Touch:Disconnect()
return isColliding
end