I’m ultra noob at roblox studio so my script is very different from other expert scripters.
So help me with this,pleaseeee.
It’s quite hard I can’t figure out how to solve the problem out.
The first one is quite normal right?
But check this out…
It doesn’t look quite right on slope.
What can I do know?
I can’t figure out how to calculate the orientation of the black part.
Just help me with it…
Edit:
My problem:
My goal:
I hope u guys know what I mean…
-------------- Explorer --------------

Script(Worker)
script.Parent.Equipped:Connect(function(Mouse)
local Humanoid = script.Parent.Parent:FindFirstChild(“Humanoid”)
script.Parent.Head.CanCollide = false
local Hold = script.Parent.Parent.Humanoid:LoadAnimation(script.Hold)
local Start = script.Parent.Parent.Humanoid:LoadAnimation(script.Start)
local Dig = script.Parent.Parent.Humanoid:LoadAnimation(script.Dig)
Hold:Play()
script.Parent.Activated:Connect(function()
if Mouse ~= nil then
local Target = Mouse.Target
local Hit = Mouse.Hit
if (Hit.p - script.Parent.Parent.HumanoidRootPart.Position).Magnitude < 5 then
Hold:Stop()
Humanoid.WalkSpeed = 0
Humanoid.JumpPower = 0
Start:Play()
wait(0.5)
Dig:Play()
wait(1)
local Event1 = script.Parent.PartCreator.CreateHole
local Event2 = script.Parent.PartCreator.Product
Event1:FireServer(Hit,script.Parent.Head.Orientation,script.Parent.Head.Size,Target)
Event2:FireServer(Hit,script.Parent.Head.Orientation,script.Parent.Head.Size,Target.DirtColor.Value,Target.CustomPhysicalProperties)
end
Humanoid.WalkSpeed = 16
Humanoid.JumpPower = 50
Hold:Play()
end
end)
script.Parent.Unequipped:Connect(function()
script.Parent.Head.CanCollide = true
Hold:Stop()
Start:Stop()
Dig:Stop()
Humanoid.WalkSpeed = 16
Humanoid.JumpPower = 50
end)
end)
Script(PartCreator)
script.CreateHole.OnServerEvent:Connect(function(plr,Hit,Orientation,Size,target)
local Part = Instance.new(“Part”)
Part.TopSurface = Enum.SurfaceType.Smooth
Part.BottomSurface = Enum.SurfaceType.Smooth
Part.CFrame = Hit
Part.Orientation = Vector3.new(0,Orientation.Y,0) <---- where the problem at.
Part.BrickColor = BrickColor.Black()
Part.Anchored = true
Part.CanCollide = false
Part.Size = Size
Part.Parent = game.Workspace
wait(60*10)
Part:Destroy()
end)
script.Product.OnServerEvent:Connect(function(plr,Hit,Orientation,Size,Color,Properties)
local Part = Instance.new(“WedgePart”)
local Ownership = Instance.new(“StringValue”)
Ownership.Value = plr.Name
Part.Material = Enum.Material.Concrete
Part.CFrame = Hit
Part.BrickColor = Color
Part.Anchored = false
Part.Size = Vector3.new(Size.Z,math.random(20,25)/10,Size.X)
Part.Parent = game.Workspace
Part.CustomPhysicalProperties = Properties
local Number = math.random(1,2)
local Sound = script:FindFirstChild(“Sound”…Number)
Sound:Play()
end)
if you don’t know I mean, just ignore all the things I wrote above.
Now is the another example:
First, we start off a part with Orientation:Vector3.new(-30,0,0)
Second, we add another part which is red with Orientation:Vector3.new(-30,0,0)
Last step, Rotate the red part 30 degrees.
Then we can know its Orientation:Vector3.new(-25.66, 33.69, -16.1)
So my question is, how can I calculate the orientation of red part with only these things:
1,The orientation of the grey part.
2,30 degrees(That I rotated the red part)
Gimme the formula if you know how 
Here is my shovel and a ground that works with the shovel:
Demo.rbxm (19.7 KB)
Note: The Shovel only works with the given land.






