I already know the basics of Lua, but I still want it to be simple. I'm trying to learn about how I should build my lines throughout the script, and apply my knowledge at the right places in the code. I have tried to do it myself, but I got errors. Here's my code:

local StarterPack = game:GetService("StarterPack")
local Tool = script.Parent
local Player = game.Players.LocalPlayer

Tool.Activated:Connect(function()
	local bullet = Instance.new("Part", game.Workspace)
	bullet.CFrame  = Player.Character.CFrame + Vector3.new(0,3,1)
	bullet.Anchored = false
	bullet.Shape = Enum.PartType.Ball
	bullet.Size = Vector3.new(1,1,1)
	bullet.Velocity  =  Vector3.new(math.random(1, 5), 0, 0)
end)