So i am just testing some things to se if they work but there is a problem its that i will be creating parts on a part but to do that i need to calculate or so to see if mouse.Hit is closer to a surface if thats possiable. Example
When i activate my tool it will look/calculate if mouse is closer to right or left surface if the mouse.Hit is closer to right surface the part will be created on the right side basicly.
I dont need help on creating the parts i have done that already just need some help on how to basicly calulate if mouse.Hit is closer to a surface
The script i have so far is
local Player = game.Players.LocalPlayer
local Char = Player.Character
local Mouse = Player:GetMouse()
script.Parent.Equipped:Connect(function()
script.Parent.Activated:Connect(function()
if Mouse.Target and Mouse.Target.Name == "Part" then
local Part = Mouse.Target
local Pos = Part.CFrame:pointToObjectSpace(Mouse.Hit.Position)
print(Pos)
end
end)
end)