runService.Heartbeat:Connect(function()
outline.Adornee = nil
if equipped then
if mouse.Target == nil then return end
if not mouse.Target:IsA("Part") then return end
if mouse.Target.Locked == true then return end
outline.Adornee = mouse.Target
outline.Parent = mouse.Target
end
end)
and It only doesnt work on one face of it,
here is all the children of the block
I tried making a new block, and sizing it the same thing with no children, problem still exists.
so it is not the block nor the children.
I’m confused. What are you trying to achieve here? You stated your problem, but I can’t seem to understand what you’re trying to accomplish here.
As @ellienonekomimi has said, you may use print statements to see what Mouse.Target is printing out.
Oh sorry for the multiple comments but also I couldnt recreate it by placing just one block, I had to spam to place like 15 blocks and then a few of them had the issue, Im confused lol
Can you try using a ray to detect the faces of the placed blocks? For every ray casted, try printing out its Instance and Normal property. Using the Mouse object doesn’t seem to give us the result of the face detected by the mouse.
Can you try printing out it’s Parent property? Or have you tried to click the print statement itself when it prints “Outline” in the console to see if your Explorer tab is highlighted?
so for the build tool I had a outline to show where you would build, cause a script was parented to it the words outline never showed up in any script! im so sorry to inconvienience yall with such a simple problem, I did spend 1 year off of the game cause I had spent weeks debugging lolz
I have seen this happen before with parts that were made or resized using building tools… Sometimes one face of a part will not register with Mouse.Target because Roblox is picky about thin parts or edges. It can also happen with unions or meshes if the collision is not precise.
One thing you can try is using your own raycast instead of Mouse.Target. It gives you more control and sometimes fixes this issue.
local userInput = game:GetService("UserInputService")
local runService = game:GetService("RunService")
local camera = workspace.CurrentCamera
runService.Heartbeat:Connect(function()
local mousePos = userInput:GetMouseLocation()
local ray = camera:ViewportPointToRay(mousePos.X, mousePos.Y)
local params = RaycastParams.new()
params.FilterType = Enum.RaycastFilterType.Blacklist
local result = workspace:Raycast(ray.Origin, ray.Direction * 500, params)
if result and result.Instance:IsA("Part") and not result.Instance.Locked then
outline.Adornee = result.Instance
outline.Parent = result.Instance
else
outline.Adornee = nil
end
end)
I am not sure if this will help in your case but it is worth testing. Also check if the part is very thin because that can cause certain faces to not be detected!!!