All was working well until I added the GUI part. Line 30 never would never error prior to adding lines 5 through 21.
EDIT: Not sure why my title isn't relevant to my question. Everyone else got it, and my question was answered.
local player = game.Players.LocalPlayer
local part = Instance.new("Part", workspace)
local weld = Instance.new("Weld", player.Character)
local mesh = Instance.new("SpecialMesh", part)
local gui = Instance.new("ScreenGui", player:WaitForChild("PlayerGui"))
local num = Instance.new("TextLabel", gui)
local button = Instance.new("TextButton", gui)
num.Size = UDim2.new(0, 50, 0, 50)
num.Position = UDim2.new(.5, -30, .7, 0)
num.BorderSizePixel = 0
num.BackGroundColor3 = Color3.new(100, 0, 0)
num.TextColor3 = Color3.new(255, 255, 255)
num.Text = "1"
button.Size = UDim2.new(0, 100, 0, 50)
button.Position = UDim2.new(.5, -45, .7, 0)
button.BorderSizePixel = 0
button.BackGroundColor3 = Color3.new(0, 0, 0)
button.TextColor3 = Color3.new(255, 255, 255)
button.Text = "Explode"
part.Material = "SmoothPlastic"
part.CanCollide = false
part.FormFactor = "Custom"
part.Size = Vector3.new(2, .5, 1)
mesh.MeshType = "FileMesh"
mesh.MeshId = "http://www.roblox.com/asset/?id=104516854"
mesh.TextureId = "http://www.roblox.com/asset/?id=104516981"
weld.Part0 = part
weld.Part1 = player.Character.Torso
weld.C0 = CFrame.new(0, -.75, 0) * CFrame.fromEulerAnglesXYZ(-math.pi/2, 0, math.pi/5)
The error occurs on line 30 apparently. Any help would be much appreciated.

5 comments
What does the error say?
Did you try removing "x/" from line 1?
I'm testing it in a Script Builder. The output says: "LocalScript:30 '=' expected near ''
@Validark Sorry, forgot to remove that. It's necessary to have that when testing it in a script builder. I removed it though.
I'm on mobile so can't test it by Ty just using mesh.texture