In the video, you can see that I made a placing system, really simple, but I was wondering how I would make the part on the sides
Client
Mouse.Button1Down:Connect(function()
if GloballyEnabled == true then
script.Place:FireServer(Mouse.Hit.Position)
script:FindFirstChildWhichIsA("Sound"):Play()
end
end)
Server
script.Parent.OnServerEvent:Connect(function(Player, MousePos)
local p = Instance.new("Part")
p.Position = MousePos
p.Parent = workspace
end)
if Mouse.Target then
local Normal = Mouse.TargetSurface
if Normal == Enum.NormalId.Top then
Y += Hitbox.Size.Y/2
end
if Normal == Enum.NormalId.Left then
X += -Hitbox.Size.X/2
end
if Normal == Enum.NormalId.Right then
X += Hitbox.Size.X/2
end
if Normal == Enum.NormalId.Front then
Z += -Hitbox.Size.Z/2
end
if Normal == Enum.NormalId.Back then
Z += Hitbox.Size.Z/2
end
end
end