Hello!
I am trying to figure out how to detect which side of a part is another part using, I need this for a building script of mine (Started as a free model but I decided to rewrite it.)
If you guys could help me figure out a way to detect, that would be awesome! (P.S this current code works but I can’t get the side of which to place the block on.)
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Target = true
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local GrassPlace = ReplicatedStorage:WaitForChild("Grass")
Mouse.Move:Connect(function()
game.Workspace.DoNotMove.Select.Highlight.Position = Vector3.new(Mouse.Target.Position.X, Mouse.Target.Position.Y, Mouse.Target.Position.Z)
end)
Mouse.Button1Down:Connect(function()
local newBlock = GrassPlace:Clone()
newBlock.CanCollide = true
newBlock.Position = Vector3.new(Mouse.Target.Position.X, Mouse.Target.Position.Y, Mouse.Target.Position.Z)
newBlock.Parent = workspace
end)